Skip to content

Commit f4e8245

Browse files
authored
[fpmsyncd] Skip routes to eth0 or docker0 (sonic-net#1606)
Fix sonic-net#6483 An FRR behavior change from 7.2 to 7.5 makes FRR update the default route to eth0 in interface up/down events. Skipping routes to eth0 or docker0 to avoid such behavior.
1 parent f4c3579 commit f4e8245

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

fpmsyncd/routesync.cpp

+15
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,21 @@ void RouteSync::onRouteMsg(int nlmsg_type, struct nl_object *obj, char *vrf)
701701
string nexthops = getNextHopGw(route_obj);
702702
string ifnames = getNextHopIf(route_obj);
703703

704+
vector<string> alsv = tokenize(ifnames, ',');
705+
for (auto alias : alsv)
706+
{
707+
/*
708+
* An FRR behavior change from 7.2 to 7.5 makes FRR update default route to eth0 in interface
709+
* up/down events. Skipping routes to eth0 or docker0 to avoid such behavior
710+
*/
711+
if (alias == "eth0" || alias == "docker0")
712+
{
713+
SWSS_LOG_NOTICE("Skip routes to eth0 or docker0: %s %s %s",
714+
destipprefix, nexthops.c_str(), ifnames.c_str());
715+
return;
716+
}
717+
}
718+
704719
vector<FieldValueTuple> fvVector;
705720
FieldValueTuple nh("nexthop", nexthops);
706721
FieldValueTuple idx("ifname", ifnames);

0 commit comments

Comments
 (0)