]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix array oob for `show ip bgp` 166/head
authorQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 3 Feb 2017 18:23:50 +0000 (18:23 +0000)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Fri, 3 Feb 2017 18:23:50 +0000 (18:23 +0000)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
bgpd/bgp_route.c

index 403bdb653c37ffeffc62367474b26d7b0a0cc70e..0123ed17eaa360087cd20f2b1545406adcd92e6f 100644 (file)
@@ -8106,7 +8106,10 @@ DEFUN (show_ip_bgp,
   bgp = bgp_lookup_by_vrf_id (vrf);
   if (bgp == NULL)
     {
-      vty_out (vty, "Can't find BGP instance %s%s", argv[5]->arg, VTY_NEWLINE);
+      if (vrf == VRF_DEFAULT)
+        vty_out (vty, "Can't find BGP instance (default)%s", VTY_NEWLINE);
+      else
+        vty_out (vty, "Can't find BGP instance %d%s", vrf, VTY_NEWLINE);
       return CMD_WARNING;
     }