From 631eb2fad08f47932ecb321cad87da870dc6a960 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Sat, 11 Mar 2017 07:56:55 -0500 Subject: [PATCH] bgpd: Some nexthop display code needs to be VRF aware When displaying nexthops we need to be able to handle the correct VRF. Signed-off-by: Donald Sharp --- bgpd/bgp_nexthop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index c76ff2c098..9300345899 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -415,7 +415,7 @@ bgp_show_nexthops (struct vty *vty, struct bgp *bgp, int detail) vty_out(vty, " gate %s, if %s%s", inet_ntop(AF_INET6, &nexthop->gate.ipv6, buf, sizeof (buf)), - ifindex2ifname(nexthop->ifindex, VRF_DEFAULT), + ifindex2ifname(nexthop->ifindex, bgp->vrf_id), VTY_NEWLINE); break; case NEXTHOP_TYPE_IPV4: @@ -425,13 +425,13 @@ bgp_show_nexthops (struct vty *vty, struct bgp *bgp, int detail) break; case NEXTHOP_TYPE_IFINDEX: vty_out (vty, " if %s%s", - ifindex2ifname(nexthop->ifindex, VRF_DEFAULT), VTY_NEWLINE); + ifindex2ifname(nexthop->ifindex, bgp->vrf_id), VTY_NEWLINE); break; case NEXTHOP_TYPE_IPV4_IFINDEX: vty_out (vty, " gate %s, if %s%s", inet_ntop(AF_INET, &nexthop->gate.ipv4, buf, sizeof (buf)), - ifindex2ifname(nexthop->ifindex, VRF_DEFAULT), VTY_NEWLINE); + ifindex2ifname(nexthop->ifindex, bgp->vrf_id), VTY_NEWLINE); break; default: vty_out (vty, " invalid nexthop type %u%s", -- 2.39.5