From 88c5dde6685bf938fcf90ffdaa07d4c838a4dda9 Mon Sep 17 00:00:00 2001 From: shi-su Date: Sat, 23 Jan 2021 04:09:37 +0000 Subject: [PATCH 1/2] Skip routes to eth0 or docker0 in fpmsyncd --- fpmsyncd/routesync.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/fpmsyncd/routesync.cpp b/fpmsyncd/routesync.cpp index d6f8574793..1d48b7a76b 100644 --- a/fpmsyncd/routesync.cpp +++ b/fpmsyncd/routesync.cpp @@ -674,6 +674,21 @@ void RouteSync::onRouteMsg(int nlmsg_type, struct nl_object *obj, char *vrf) string nexthops = getNextHopGw(route_obj); string ifnames = getNextHopIf(route_obj); + vector 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 aviod 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 fvVector; FieldValueTuple nh("nexthop", nexthops); FieldValueTuple idx("ifname", ifnames); From dd637a0e0628f3e86025fd842815743ef429152e Mon Sep 17 00:00:00 2001 From: shi-su Date: Sat, 23 Jan 2021 04:13:32 +0000 Subject: [PATCH 2/2] correct a typo --- fpmsyncd/routesync.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpmsyncd/routesync.cpp b/fpmsyncd/routesync.cpp index 1d48b7a76b..1851c96200 100644 --- a/fpmsyncd/routesync.cpp +++ b/fpmsyncd/routesync.cpp @@ -679,7 +679,7 @@ void RouteSync::onRouteMsg(int nlmsg_type, struct nl_object *obj, char *vrf) { /* * 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 aviod such behavior + * up/down events. Skipping routes to eth0 or docker0 to avoid such behavior */ if (alias == "eth0" || alias == "docker0") {