summaryrefslogtreecommitdiff
path: root/bgpd/bgp_zebra.c
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_zebra.c')
-rw-r--r--bgpd/bgp_zebra.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index cd1873054e..f7c4b04adf 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -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,
&ifindex);
- nh_updated = update_ipv6nh_for_route_install(
- nh_othervrf, nh_othervrf ?
- info->extra->bgp_orig : bgp,
- nexthop, ifindex,
- mpinfo, info, is_evpn, api_nh);
+
+ if (!nexthop)
+ nh_updated = update_ipv4nh_for_route_install(
+ nh_othervrf,
+ 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? */