Skip to content

Commit 941b3d8

Browse files
Merge pull request #16645 from danwinship/alreadysetup
Automatic merge from submit-queue. Fix route checking in alreadySetUp We want to check that each cluster network has a corresponding route, not that each route has a corresponding cluster network. Fixes #16630
2 parents 5295973 + 1276ee1 commit 941b3d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/network/node/sdn_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ func (plugin *OsdnNode) alreadySetUp(localSubnetGatewayCIDR string, clusterNetwo
8989
if err != nil {
9090
return false
9191
}
92-
for _, route := range routes {
92+
for _, clusterCIDR := range clusterNetworkCIDR {
9393
found = false
94-
for _, clusterCIDR := range clusterNetworkCIDR {
94+
for _, route := range routes {
9595
if route.Dst != nil && route.Dst.String() == clusterCIDR {
9696
found = true
9797
break

0 commit comments

Comments
 (0)