]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: deref the ES on interface delete even if it was not setup as a br-port
authorAnuradha Karuppiah <anuradhak@nvidia.com>
Mon, 9 Aug 2021 18:50:22 +0000 (11:50 -0700)
committerAnuradha Karuppiah <anuradhak@nvidia.com>
Fri, 15 Oct 2021 17:43:41 +0000 (10:43 -0700)
This addresses deletion of ES interfaces that are were not completely
configured.

Ticket: #2668488

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

index e03cf9db061fc71a548dffaeadcaa9e90345ad55..70382fea6a346be44443fcfe34525e45a3281fd8 100644 (file)
@@ -1050,15 +1050,15 @@ void zebra_evpn_if_cleanup(struct zebra_if *zif)
        vlanid_t vid;
        struct zebra_evpn_es *es;
 
-       if (!bf_is_inited(zif->vlan_bitmap))
-               return;
+       if (bf_is_inited(zif->vlan_bitmap)) {
+               bf_for_each_set_bit(zif->vlan_bitmap, vid, IF_VLAN_BITMAP_MAX)
+               {
+                       zebra_evpn_vl_mbr_deref(vid, zif);
+               }
 
-       bf_for_each_set_bit(zif->vlan_bitmap, vid, IF_VLAN_BITMAP_MAX) {
-               zebra_evpn_vl_mbr_deref(vid, zif);
+               bf_free(zif->vlan_bitmap);
        }
 
-       bf_free(zif->vlan_bitmap);
-
        /* Delete associated Ethernet Segment */
        es = zif->es_info.es;
        if (es)