]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix show ip bgp vrf <vrf> nexthop 1161/head
authorDon Slice <dslice@cumulusnetworks.com>
Thu, 7 Sep 2017 19:43:27 +0000 (19:43 +0000)
committerDon Slice <dslice@cumulusnetworks.com>
Tue, 12 Sep 2017 14:16:44 +0000 (14:16 +0000)
Problem with not finding the correct bgp instance when doing the command
"show ip bgp vrf <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 <dslice@cumulusnetworks.com>
Reviewed-by: CCR-6664
bgpd/bgp_nexthop.c

index 1200d74d6a59246846d800928bda511c66770993..8c08fe4c8f1ca19d2b56ae8c2e4c9e2f60c59db8 100644 (file)
@@ -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);
 }