Skip to content

Commit

Permalink
Merge pull request #16645 from danwinship/alreadysetup
Browse files Browse the repository at this point in the history
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
  • Loading branch information
openshift-merge-robot authored Oct 3, 2017
2 parents 5295973 + 1276ee1 commit 941b3d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/network/node/sdn_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ func (plugin *OsdnNode) alreadySetUp(localSubnetGatewayCIDR string, clusterNetwo
if err != nil {
return false
}
for _, route := range routes {
for _, clusterCIDR := range clusterNetworkCIDR {
found = false
for _, clusterCIDR := range clusterNetworkCIDR {
for _, route := range routes {
if route.Dst != nil && route.Dst.String() == clusterCIDR {
found = true
break
Expand Down

0 comments on commit 941b3d8

Please sign in to comment.