Skip to content

Commit e032ff5

Browse files
committed
[neighsync] VXLAN EVPN neighbors not in NEIGH_TABLE (PR sonic-net#3478)
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 The reason it was not occurring is NOARP entries were being rejected, this patch adds an exception for externally learned neighbors. Signed-off-by: Brad House (@bradh352)
1 parent 4b61f13 commit e032ff5

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

neighsyncd/neighsync.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
#include "warm_restart.h"
1616
#include <algorithm>
1717

18+
#ifndef NTF_EXT_LEARNED
19+
/* from include/uapi/linux/neighbour.h */
20+
# define NTF_EXT_LEARNED (1 << 4)
21+
#endif
22+
1823
using namespace std;
1924
using namespace swss;
2025

@@ -98,18 +103,28 @@ void NeighSync::onMsg(int nlmsg_type, struct nl_object *obj)
98103
{
99104
if ((isLinkLocalEnabled(intfName) == false) && (nlmsg_type != RTM_DELNEIGH))
100105
{
106+
SWSS_LOG_INFO("LinkLocal address received, ignoring for %s", ipStr);
101107
return;
102108
}
103109
}
104110
/* Ignore IPv6 multicast link-local addresses as neighbors */
105111
if (family == IPV6_NAME && IN6_IS_ADDR_MC_LINKLOCAL(nl_addr_get_binary_addr(rtnl_neigh_get_dst(neigh))))
112+
{
113+
SWSS_LOG_INFO("Multicast LinkLocal address received, ignoring for %s", ipStr);
106114
return;
115+
}
107116
key+= ipStr;
108117

109118
int state = rtnl_neigh_get_state(neigh);
110119
if (state == NUD_NOARP)
111120
{
112-
return;
121+
/* For externally learned neighbors, e.g. VXLAN EVPN, we want to keep
122+
* these neighbors. */
123+
if (!(rtnl_neigh_get_flags(neigh) & NTF_EXT_LEARNED))
124+
{
125+
SWSS_LOG_INFO("NOARP address received, ignoring for %s", ipStr);
126+
return;
127+
}
113128
}
114129

115130
bool delete_key = false;

0 commit comments

Comments
 (0)