Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/netinet6/route_v6.c
Original file line number Diff line number Diff line change
Expand Up @@ -2912,6 +2912,10 @@ int handle_route6(vrfid_t vrf_id, uint16_t type, const struct rtmsg *rtm,
if (!(nl_flags & NL_FLAG_ANY_ADDR))
flags |= RTF_GATEWAY;

if (IN6_IS_ADDR_V4MAPPED(&gw)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing the check only here won't the case of having an ECMP route, such as in the case of having an eiBGP 6PE/6VPE route. In addition, it possibly is confusing to the reader to look gw here, when it may or may not be used. Thus I would suggest pushing this check inside mpath conditional else block just below, and adding a similar check to the appropriate place in the logic called from ecmp6_create.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Robert,

Thanks for your review.
We understood your corrections suggested.
In ecmp6_create() we see nexthop6_fill_mpls() is already having the similar check, so we are adding the check in nexthop6_fill().

Thanks,

flags |= RTF_MAPPED_IPV6;
}

if (mpath) {
next = ecmp6_create(mpath, &size, &missing_ifp);
if (missing_ifp)
Expand Down