-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[fpmsyncd] Skip routes to eth0 or docker0 #1606
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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<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; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Take this as a example: At first route 0.0.0.0/0 had a multipath nexthop "Ethernet0,Ethernet1", and some minutes later it became "Ethernet0,Ethernet1,eth0". Last it becomes "eth0". Since the change filters all routes including the eth0 nexthop, in the example this changes prevent "Ethernet0,Ethernet1" from exiting the next-hop list in ASIC. This is a rare situation but I suggest to take this into consideration. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in our design, we would not have such mixed scenario. |
||
} | ||
} | ||
|
||
vector<FieldValueTuple> fvVector; | ||
FieldValueTuple nh("nexthop", nexthops); | ||
FieldValueTuple idx("ifname", ifnames); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comment, route updates can be in INFO level log.