Skip to content

Commit

Permalink
node-neigh: Fix obsolete nextHop removal
Browse files Browse the repository at this point in the history
The impact of the wrong removal was very small - unnecessary neigh
insert via netlink and dangling unused value. This could have happened
under very rare circumstances when a next hop to a node had changed.

Fixes: 0483ba0 ("node-neigh: Do not inc neighbor refcount for the same node")
Signed-off-by: Martynas Pumputis <m@lambda.lt>
  • Loading branch information
brb authored and ti-mo committed May 7, 2021
1 parent c3d971a commit a753b38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/datapath/linux/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ func (n *linuxNodeHandler) insertNeighbor(ctx context.Context, newNode *nodeType
logfields.LinkIndex: neigh.LinkIndex,
}).WithError(err).Info("Unable to remove neighbor entry")
}
delete(n.neighByNextHop, nextHopStr)
delete(n.neighByNextHop, existingNextHopStr)
delete(n.neighLastPingByNextHop, existingNextHopStr)
if option.Config.NodePortHairpin {
neighborsmap.NeighRetire(net.ParseIP(existingNextHopStr))
Expand Down

0 comments on commit a753b38

Please sign in to comment.