]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: skip EVI setup if an ES is applied to a pseudo interface 7722/head
authorAnuradha Karuppiah <anuradhak@cumulusnetworks.com>
Wed, 7 Oct 2020 18:33:13 +0000 (11:33 -0700)
committerAnuradha Karuppiah <anuradhak@nvidia.com>
Mon, 21 Dec 2020 16:41:17 +0000 (08:41 -0800)
zebra maintains pseudo interface for hanging off user config after
the interface is deleted in the kernel. If an user tried to config
an ES against such an interface zebra would crash with the following
call stack -
    at zebra/zebra_evpn_mh.c:2095
    sysmac=sysmac@entry=0x55cfbadd3160) at zebra/zebra_evpn_mh.c:2258
    at zebra/zebra_evpn_mh.c:3222
    argv=<optimized out>, es_lid_str=<optimized out>, es_lid=1, no=0x0, vty=0x55cfbaf4c7b0)
    at zebra/zebra_evpn_mh.c:3222
    argv=<optimized out>) at ./zebra/zebra_evpn_mh_clippy.c:202
    vty=vty@entry=0x55cfbaf4c7b0, cmd=cmd@entry=0x0, filter=FILTER_RELAXED)
    at lib/command.c:1073

Ticket: CM-31702

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
zebra/zebra_evpn_mh.c

index 79868e7fc9cad735cf68751eb8870b160253b9df..7e712bf1ee9587cc3230f058efd922f95a7833a2 100644 (file)
@@ -1864,6 +1864,8 @@ static void zebra_evpn_es_setup_evis(struct zebra_evpn_es *es)
        uint16_t vid;
        struct zebra_evpn_access_bd *acc_bd;
 
+       if (!bf_is_inited(zif->vlan_bitmap))
+               return;
 
        bf_for_each_set_bit(zif->vlan_bitmap, vid, IF_VLAN_BITMAP_MAX) {
                acc_bd = zebra_evpn_acc_vl_find(vid);