Skip to content

Commit

Permalink
no need for reflect for ints you dum dum
Browse files Browse the repository at this point in the history
  • Loading branch information
gunjan5 committed Nov 1, 2017
1 parent 0e4a142 commit 46b7303
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func setupRoutes(hostVeth netlink.Link, result *current.Result) error {
// If the route we want is already there then most likely it's programmed by Felix, so we ignore it,
// and we return an error if none of the routes match the route we're trying to program.
for _, r := range routes {
if reflect.DeepEqual(r.LinkIndex, route.LinkIndex) && reflect.DeepEqual(r.Dst, route.Dst) && reflect.DeepEqual(r.Scope, route.Scope) {
if r.LinkIndex == route.LinkIndex && reflect.DeepEqual(r.Dst, route.Dst) && reflect.DeepEqual(r.Scope, route.Scope) {
// Route was already present on the host.
logrus.Infof("CNI skipping add route. Route already exists for %s\n", hostVeth.Attrs().Name)
return nil
Expand Down

0 comments on commit 46b7303

Please sign in to comment.