]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Bug fix in "show bgp l2vpn evpn ... advertised-routes' 5324/head
authorLakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Tue, 12 Nov 2019 22:02:05 +0000 (14:02 -0800)
committerLakshman Krishnamoorthy <lkrishnamoor@vmware.com>
Tue, 12 Nov 2019 22:02:05 +0000 (14:02 -0800)
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>
bgpd/bgp_vpn.c

index e48eda72318b100b7624e9e297416811ffd1e36c..f922d066c322ff7bc212ed9925821ed8a749a0c8 100644 (file)
@@ -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(