Skip to content

Commit b392e88

Browse files
bradh352bluecmd
authored andcommitted
bug: VXLAN EVPN neighbors not in NEIGH_TABLE (sonic-net#3478)
* [neighsync] VXLAN EVPN neighbors not in NEIGH_TABLE VXLAN EVPN learned routes are not entered into NEIGH_TABLE as per Issue sonic-net#3384. The EVPN VXLAN HLD specifically states this should be populated so it triggers an update to the SAI database: https://github.com/sonic-net/SONiC/blob/master/doc/vxlan/EVPN/EVPN_VXLAN_HLD.md#438-mac-ip-route-handling
1 parent a7fa1e1 commit b392e88

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

neighsyncd/neighsync.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "neighsync.h"
1515
#include "warm_restart.h"
1616
#include <algorithm>
17+
#include <linux/neighbour.h>
1718

1819
using namespace std;
1920
using namespace swss;
@@ -98,18 +99,28 @@ void NeighSync::onMsg(int nlmsg_type, struct nl_object *obj)
9899
{
99100
if ((isLinkLocalEnabled(intfName) == false) && (nlmsg_type != RTM_DELNEIGH))
100101
{
102+
SWSS_LOG_INFO("LinkLocal address received, ignoring for %s", ipStr);
101103
return;
102104
}
103105
}
104106
/* Ignore IPv6 multicast link-local addresses as neighbors */
105107
if (family == IPV6_NAME && IN6_IS_ADDR_MC_LINKLOCAL(nl_addr_get_binary_addr(rtnl_neigh_get_dst(neigh))))
108+
{
109+
SWSS_LOG_INFO("Multicast LinkLocal address received, ignoring for %s", ipStr);
106110
return;
111+
}
107112
key+= ipStr;
108113

109114
int state = rtnl_neigh_get_state(neigh);
110115
if (state == NUD_NOARP)
111116
{
112-
return;
117+
/* For externally learned neighbors, e.g. VXLAN EVPN, we want to keep
118+
* these neighbors. */
119+
if (!(rtnl_neigh_get_flags(neigh) & NTF_EXT_LEARNED))
120+
{
121+
SWSS_LOG_INFO("NOARP address received, ignoring for %s", ipStr);
122+
return;
123+
}
113124
}
114125

115126
bool delete_key = false;

0 commit comments

Comments
 (0)