From: Lou Berger Date: Fri, 29 Sep 2017 15:32:10 +0000 (-0400) Subject: bgpd: fix show bgp ipvX vpn all rd X-Git-Tag: frr-4.0-dev~235^2~3 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=3d7c4cd7347021afb6c496ae9ce52ae2f0506686;p=mirror%2Ffrr.git bgpd: fix show bgp ipvX vpn all rd Signed-off-by: Lou Berger --- diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c index 85bb38143f..d390998b12 100644 --- a/bgpd/bgp_mplsvpn.c +++ b/bgpd/bgp_mplsvpn.c @@ -382,15 +382,14 @@ DEFUN (show_bgp_ip_vpn_all_rd, "VPN Route Distinguisher\n" JSON_STR) { - int idx_rd = 5; int ret; struct prefix_rd prd; afi_t afi; int idx = 0; if (argv_find_and_parse_afi(argv, argc, &idx, &afi)) { - if (argc >= 7 && argv[idx_rd]->arg) { - ret = str2prefix_rd(argv[idx_rd]->arg, &prd); + if (argv_find(argv, argc, "rd", &idx)) { + ret = str2prefix_rd(argv[idx+1]->arg, &prd); if (!ret) { vty_out(vty, "%% Malformed Route Distinguisher\n");