Skip to content

Commit

Permalink
[neighsync] VXLAN EVPN neighbors not in NEIGH_TABLE (PR sonic-net#3478)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
bradh352 committed Jan 21, 2025
1 parent 7909393 commit f9647f0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion neighsyncd/neighsync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
#include "warm_restart.h"
#include <algorithm>

#ifndef NTF_EXT_LEARNED
/* from include/uapi/linux/neighbour.h */
# define NTF_EXT_LEARNED (1 << 4)
#endif

using namespace std;
using namespace swss;

Expand Down Expand Up @@ -98,18 +103,28 @@ void NeighSync::onMsg(int nlmsg_type, struct nl_object *obj)
{
if ((isLinkLocalEnabled(intfName) == false) && (nlmsg_type != RTM_DELNEIGH))
{
SWSS_LOG_INFO("LinkLocal address received, ignoring for %s", ipStr);
return;
}
}
/* Ignore IPv6 multicast link-local addresses as neighbors */
if (family == IPV6_NAME && IN6_IS_ADDR_MC_LINKLOCAL(nl_addr_get_binary_addr(rtnl_neigh_get_dst(neigh))))
{
SWSS_LOG_INFO("Multicast LinkLocal address received, ignoring for %s", ipStr);
return;
}
key+= ipStr;

int state = rtnl_neigh_get_state(neigh);
if (state == NUD_NOARP)
{
return;
/* For externally learned neighbors, e.g. VXLAN EVPN, we want to keep
* these neighbors. */
if (!(rtnl_neigh_get_flags(neigh) & NTF_EXT_LEARNED))
{
SWSS_LOG_INFO("NOARP address received, ignoring for %s", ipStr);
return;
}
}

bool delete_key = false;
Expand Down

0 comments on commit f9647f0

Please sign in to comment.