Skip to content

Commit

Permalink
Revert "Revert "[fpmsyncd] Skip routes to eth0 or docker0 (sonic-net#…
Browse files Browse the repository at this point in the history
…1606)""

This reverts commit ea9c669.
  • Loading branch information
abdosi committed Feb 18, 2022
1 parent ea9c669 commit 81b49b6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions fpmsyncd/routesync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,21 @@ void RouteSync::onRouteMsg(int nlmsg_type, struct nl_object *obj, char *vrf)
string nexthops = getNextHopGw(route_obj);
string ifnames = getNextHopIf(route_obj);

vector<string> alsv = tokenize(ifnames, ',');
for (auto alias : alsv)
{
/*
* An FRR behavior change from 7.2 to 7.5 makes FRR update default route to eth0 in interface
* up/down events. Skipping routes to eth0 or docker0 to avoid such behavior
*/
if (alias == "eth0" || alias == "docker0")
{
SWSS_LOG_NOTICE("Skip routes to eth0 or docker0: %s %s %s",
destipprefix, nexthops.c_str(), ifnames.c_str());
return;
}
}

vector<FieldValueTuple> fvVector;
FieldValueTuple nh("nexthop", nexthops);
FieldValueTuple idx("ifname", ifnames);
Expand Down

0 comments on commit 81b49b6

Please sign in to comment.