summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2017-02-03 18:23:50 +0000
committerQuentin Young <qlyoung@cumulusnetworks.com>2017-02-03 18:23:50 +0000
commit477be8c18f8bda1076843f6dc000e12f0b90bbe7 (patch)
tree534f29e93d2be2a241d1236ca21f0f4011897ce7
parent06109208a597ddcbed2bb5646dddd98848431698 (diff)
bgpd: fix array oob for `show ip bgp`
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
-rw-r--r--bgpd/bgp_route.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 403bdb653c..0123ed17ea 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -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;
}