]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: resolve ipv6 ecmp issue with vrfs and ll nexthop
authorDon Slice <dslice@cumulusnetworks.com>
Wed, 5 Apr 2017 14:13:45 +0000 (07:13 -0700)
committerDon Slice <dslice@cumulusnetworks.com>
Tue, 16 May 2017 20:23:11 +0000 (16:23 -0400)
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 <dslice@cumulusnetworks.com>
Reviewed-by: CCR-6017
bgpd/bgp_zebra.c

index 3d3bd90f5be4aaee97bdd9b0694e8c186eb54adf..d07fc65bdf687b8e969f5a001e7af68f33e232fd 100644 (file)
@@ -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;
            }