Skip to content

Commit

Permalink
[routesync] Fix for stale dynamic neighbor
Browse files Browse the repository at this point in the history
Signed-off-by: vedganes <veda.ganesan@nokia.com>

The changes are for fixing stale neighbor in the ASIC_DB and data path
when eBGP neighbors are shutdown and neighbors are flushed. The problem
is described in issue: sonic-net/sonic-buildimage#12442
The root cause of this issue is due to not deleing the route from the
ASIC_DB when the route's next hop is on eth0 or docker0 interface. The solution is
to delete the route entry from ASIC_DB instead of just returning when the route's
next hop is on the interface eth0 or docker0
  • Loading branch information
vganesan-nokia committed Nov 29, 2022
1 parent bc3c894 commit 69ecd73
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fpmsyncd/routesync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,17 @@ void RouteSync::onRouteMsg(int nlmsg_type, struct nl_object *obj, char *vrf)
{
SWSS_LOG_DEBUG("Skip routes to eth0 or docker0: %s %s %s",
destipprefix, gw_list.c_str(), intf_list.c_str());
// If intf_list has only this interface, that means all of the next hops of this route
// have been removed and the next hop on the eth0/docker0 has become the only next hop.
// In this case since we do not want the route with next hop on eth0/docker0, we return.
// But still we need to clear the route from the APPL_DB. Otherwise the APPL_DB and data
// path will be left with stale route entry
if(alsv.size() == 1)
{
SWSS_LOG_NOTICE("RouteTable del msg for route with only one nh on eth0/docker0: %s %s %s %s",
destipprefix, gw_list.c_str(), intf_list.c_str(), mpls_list.c_str());
m_routeTable.del(destipprefix);
}
return;
}
}
Expand Down

0 comments on commit 69ecd73

Please sign in to comment.