summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2017-09-29 17:32:10 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-10-05 16:11:49 +0200
commit3d7c4cd7347021afb6c496ae9ce52ae2f0506686 (patch)
treeb0ca62ec3ff715e8790ef0bbb42d341b75b17b66 /bgpd
parentbgpd: remove old/broken vpnv4 from of show bgp (diff)
downloadfrr-3d7c4cd7347021afb6c496ae9ce52ae2f0506686.tar.xz
frr-3d7c4cd7347021afb6c496ae9ce52ae2f0506686.zip
bgpd: fix show bgp ipvX vpn all rd
Signed-off-by: Lou Berger <lberger@labn.net>
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_mplsvpn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index 85bb38143..d390998b1 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");