From fa14eb2c0b408982a6634459b3afb21e9df6326a Mon Sep 17 00:00:00 2001 From: Don Slice Date: Wed, 5 Apr 2017 07:13:45 -0700 Subject: [PATCH] bgpd: resolve ipv6 ecmp issue with vrfs and ll nexthop Problem reported that ecmp wasn't working correctly in a vrf with ipv6. Issue was that originator of the routes were sending the updates with a link-local nexthop and nhlen of 16. In this particular case, bgp_zebra_announce was using the wrong call to get the ifindex and was not supplying the vrf. This caused ecmp to work only in the case of the default vrf. Ticket: CM-15545 Signed-off-by: Don Slice Reviewed-by: CCR-6017 --- bgpd/bgp_zebra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 3d3bd90f5b..d07fc65bdf 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1469,7 +1469,8 @@ bgp_zebra_announce (struct prefix *p, struct bgp_info *info, struct bgp *bgp, if (!ifindex) { if (info->peer->conf_if || info->peer->ifname) - ifindex = if_nametoindex (info->peer->conf_if ? info->peer->conf_if : info->peer->ifname); + ifindex = ifname2ifindex_vrf (info->peer->conf_if ? info->peer->conf_if : + info->peer->ifname, bgp->vrf_id); else if (info->peer->nexthop.ifp) ifindex = info->peer->nexthop.ifp->ifindex; }