bridge domain: fix members reordered when removing 84/5584/3
authorEyal Bari <ebari@cisco.com>
Thu, 2 Mar 2017 08:43:19 +0000 (10:43 +0200)
committerJohn Lo <loj@cisco.com>
Thu, 2 Mar 2017 19:43:18 +0000 (19:43 +0000)
since adding support for multicast vxlan flooding (flood class tunnel master)
correct flood functionality depends on the order of the memebers vector

solved by using vec_delete instead of vec_del1 which swaps members before deleting the last element

Change-Id: I234f218d49172b4142c567db9699a5cb274e4a66
Signed-off-by: Eyal Bari <ebari@cisco.com>
src/vnet/l2/l2_bd.c

index 22f83d0..f741b64 100644 (file)
@@ -185,7 +185,7 @@ bd_remove_member (l2_bridge_domain_t * bd_config, u32 sw_if_index)
            else if (sw_if->flood_class == VNET_FLOOD_CLASS_TUNNEL_NORMAL)
              bd_config->tun_normal_count--;
          }
-       vec_del1 (bd_config->members, ix);
+       vec_delete (bd_config->members, 1, ix);
        update_flood_count (bd_config);
 
        return BD_REMOVE_ERROR_OK;