Skip to content

Commit

Permalink
fix(bgp_policies.go): return -> continue on family set evaluation
Browse files Browse the repository at this point in the history
When a single IP family's set looks to be equal, switch to continue
instead of return so that other families can still be evaluated as those
might have changes.
  • Loading branch information
aauren committed Oct 7, 2023
1 parent 3387f5c commit f5ac980
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controllers/routing/bgp_policies.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (nrc *NetworkRoutingController) addServiceVIPsDefinedSet() error {
return currentPrefixes[i].IpPrefix < currentPrefixes[j].IpPrefix
})
if reflect.DeepEqual(advIPPrefixList, currentPrefixes) {
return nil
continue
}
toAdd := make([]*gobgpapi.Prefix, 0)
toDelete := make([]*gobgpapi.Prefix, 0)
Expand Down Expand Up @@ -376,7 +376,7 @@ func (nrc *NetworkRoutingController) addiBGPPeersDefinedSet() (map[v1core.IPFami
sort.Strings(iBGPPeerCIDRs[family])
sort.Strings(currentCIDRs)
if reflect.DeepEqual(iBGPPeerCIDRs, currentCIDRs) {
return iBGPPeerCIDRs, nil
continue
}
toAdd := make([]string, 0)
toDelete := make([]string, 0)
Expand Down

0 comments on commit f5ac980

Please sign in to comment.