summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_vpn.c
diff options
context:
space:
mode:
authorLakshman Krishnamoorthy <lkrishnamoor@vmware.com>2019-11-12 23:02:05 +0100
committerLakshman Krishnamoorthy <lkrishnamoor@vmware.com>2019-11-12 23:02:05 +0100
commit10d5be75aa99fef20acca97c4441e18982f8dad9 (patch)
tree0d3a273766a066ac54d6e516d2c64764cf5f652b /bgpd/bgp_vpn.c
parentMerge pull request #5307 from ton31337/fix/bgp_dampening_per_afi_safi (diff)
downloadfrr-10d5be75aa99fef20acca97c4441e18982f8dad9.tar.xz
frr-10d5be75aa99fef20acca97c4441e18982f8dad9.zip
bgpd: Bug fix in "show bgp l2vpn evpn ... advertised-routes'
The bug: As part of displaying advertised routes to a peer, in the outer loop, we iterate through all prefixes in the evpn table. In the inner loop, we iterate through adj_out of each prefix. If a prefix which is present in the evpn table is not advertised to a peer, its corresponding attr == NULL. Checking for this condition is the fix. Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Diffstat (limited to 'bgpd/bgp_vpn.c')
-rw-r--r--bgpd/bgp_vpn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bgpd/bgp_vpn.c b/bgpd/bgp_vpn.c
index e48eda723..f922d066c 100644
--- a/bgpd/bgp_vpn.c
+++ b/bgpd/bgp_vpn.c
@@ -106,6 +106,9 @@ int show_adj_route_vpn(struct vty *vty, struct peer *peer,
if (bgp_node_get_bgp_path_info(rm) == NULL)
continue;
+ if (!attr)
+ continue;
+
if (header) {
if (use_json) {
json_object_int_add(