From: Don Slice Date: Thu, 7 Sep 2017 19:43:27 +0000 (+0000) Subject: bgpd: fix show ip bgp vrf nexthop X-Git-Tag: frr-4.0-dev~317^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F1161%2Fhead;p=mirror%2Ffrr.git bgpd: fix show ip bgp vrf nexthop Problem with not finding the correct bgp instance when doing the command "show ip bgp vrf nexthop" resolved by setting up the arg values correctly. Manual testing fine. bgp-smoke had no new failures. Ticket: CM-17454 Signed-off-by: Don Slice Reviewed-by: CCR-6664 --- diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c index 1200d74d6a..8c08fe4c8f 100644 --- a/bgpd/bgp_nexthop.c +++ b/bgpd/bgp_nexthop.c @@ -580,7 +580,11 @@ DEFUN (show_ip_bgp_nexthop, "Show detailed information\n") { int idx = 0; - char *vrf = argv_find(argv, argc, "WORD", &idx) ? argv[idx]->arg : NULL; + char *vrf = NULL; + + if (argv_find(argv, argc, "view", &idx) + || argv_find(argv, argc, "vrf", &idx)) + vrf = argv[++idx]->arg; int detail = argv_find(argv, argc, "detail", &idx) ? 1 : 0; return show_ip_bgp_nexthop_table(vty, vrf, detail); }