summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_vpn.c
diff options
context:
space:
mode:
authorDinesh Dutt <5016467+ddutt@users.noreply.github.com>2019-08-08 04:58:18 +0200
committerDinesh Dutt <5016467+ddutt@users.noreply.github.com>2019-08-08 06:17:26 +0200
commitdcc1615e1b5f8f439f01fd9e61845f377d28a07a (patch)
tree93cdbbddb48b5743242673800d372f11ff63b33c /bgpd/bgp_vpn.c
parentMerge pull request #4763 from opensourcerouting/ds-work (diff)
downloadfrr-dcc1615e1b5f8f439f01fd9e61845f377d28a07a.tar.xz
frr-dcc1615e1b5f8f439f01fd9e61845f377d28a07a.zip
bgpd: Display received and advertised EVPN routes from neighbors
"show bgp l2vpn evpn neighbors <neighbor> [advertised-routes|routes]' did not work due to various bugs. First, the command only accepted IPv4 addresses as valid neighbor ID, thereby rejecting unnumbered BGP and IPv6 neighbor address. Second, the SAFI was hardcoded to MPLS_VPN even though we were passing the safi. Third, "all" made no sense in the command context and to make the command uniform across all address families, I removed the "all" keyword from the command. Signed-off-by: Dinesh G Dutt <ddps4u@gmail.com>
Diffstat (limited to 'bgpd/bgp_vpn.c')
-rw-r--r--bgpd/bgp_vpn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bgpd/bgp_vpn.c b/bgpd/bgp_vpn.c
index 54ca980ca..09b1cb429 100644
--- a/bgpd/bgp_vpn.c
+++ b/bgpd/bgp_vpn.c
@@ -74,7 +74,7 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
json_object_string_add(json_ocode, "incomplete", "?");
}
- for (rn = bgp_table_top(bgp->rib[afi][SAFI_MPLS_VPN]); rn;
+ for (rn = bgp_table_top(bgp->rib[afi][safi]); rn;
rn = bgp_route_next(rn)) {
if (prd && memcmp(rn->p.u.val, prd->val, 8) != 0)
continue;
@@ -200,7 +200,7 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
json_array);
} else {
route_vty_out_tmp(vty, &rm->p, path->attr,
- SAFI_MPLS_VPN, use_json,
+ safi, use_json,
json_array);
}
}