Merge pull request #7670 from ton31337/fix/bgpd_nexhop_handling_for_zebra

bgpd: Handle IPv6 prefixes with IPv4 nexthops for zebra
This commit is contained in:
Russ White 2021-01-12 07:32:19 -05:00 committed by GitHub
commit 7fbdb03103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1347,11 +1347,21 @@ void bgp_zebra_announce(struct bgp_dest *dest, const struct prefix *p,
nexthop = bgp_path_info_to_ipv6_nexthop(mpinfo_cp, nexthop = bgp_path_info_to_ipv6_nexthop(mpinfo_cp,
&ifindex); &ifindex);
nh_updated = update_ipv6nh_for_route_install(
nh_othervrf, nh_othervrf ? if (!nexthop)
info->extra->bgp_orig : bgp, nh_updated = update_ipv4nh_for_route_install(
nexthop, ifindex, nh_othervrf,
mpinfo, info, is_evpn, api_nh); nh_othervrf ? info->extra->bgp_orig
: bgp,
&mpinfo_cp->attr->nexthop,
mpinfo_cp->attr, is_evpn, api_nh);
else
nh_updated = update_ipv6nh_for_route_install(
nh_othervrf,
nh_othervrf ? info->extra->bgp_orig
: bgp,
nexthop, ifindex, mpinfo, info, is_evpn,
api_nh);
} }
/* Did we get proper nexthop info to update zebra? */ /* Did we get proper nexthop info to update zebra? */