From f0ec32f3e5d7099533ab756d91ad4b11ad5a8da0 Mon Sep 17 00:00:00 2001 From: "Saikumar, Banoth" Date: Wed, 28 Aug 2024 19:10:54 +0100 Subject: [PATCH] fix(evpn-bridge): netlink neighbor fix Signed-off-by: Saikumar, Banoth --- pkg/netlink/neighbor.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pkg/netlink/neighbor.go b/pkg/netlink/neighbor.go index 8d12ab23..1e404df8 100644 --- a/pkg/netlink/neighbor.go +++ b/pkg/netlink/neighbor.go @@ -121,10 +121,8 @@ func cmdProcessNb(nbs []NeighIPStruct, v string) NeighList { // addNeigh adds the neigh func addNeigh(dump NeighList) { for _, n := range dump.NS { - n.neighborAnnotate() - if len(latestNeighbors) == 0 { - latestNeighbors[n.Key] = n - } else if !CheckNdup(n.Key) { + n = n.neighborAnnotate() + if len(latestNeighbors) == 0 || !CheckNdup(n.Key) { latestNeighbors[n.Key] = n } }