diff options
author | Eyal Bari <ebari@cisco.com> | 2018-07-11 14:01:36 +0300 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-07-11 13:43:40 +0000 |
commit | b6b04f0c2a64d6edd536add6900e9d458c2fe8d1 (patch) | |
tree | c23d667969309140ae020ab7804efd07d360f65d /src/vnet/l2 | |
parent | 20728d40d91b89fe9f9d8d8c3f4ec16d51412c8b (diff) |
bridge-domain:fix no_flood count
no_flood count was not updated on removal
might couase a negative insertion index when adding new members
Change-Id: I2caf2c453dfef1a9f16fb8fa2e5af42b4e653a69
Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet/l2')
-rw-r--r-- | src/vnet/l2/l2_bd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/l2/l2_bd.c b/src/vnet/l2/l2_bd.c index 7c3e70ce189..3a71091a4f3 100644 --- a/src/vnet/l2/l2_bd.c +++ b/src/vnet/l2/l2_bd.c @@ -58,6 +58,7 @@ bd_validate (l2_bridge_domain_t * bd_config) bd_config->flood_count = 0; bd_config->tun_master_count = 0; bd_config->tun_normal_count = 0; + bd_config->no_flood_count = 0; bd_config->mac_by_ip4 = 0; bd_config->mac_by_ip6 = hash_create_mem (0, sizeof (ip6_address_t), sizeof (uword)); @@ -199,6 +200,8 @@ bd_remove_member (l2_bridge_domain_t * bd_config, u32 sw_if_index) bd_config->tun_master_count--; else if (sw_if->flood_class == VNET_FLOOD_CLASS_TUNNEL_NORMAL) bd_config->tun_normal_count--; + else if (sw_if->flood_class == VNET_FLOOD_CLASS_NO_FLOOD) + bd_config->no_flood_count--; } vec_delete (bd_config->members, 1, ix); update_flood_count (bd_config); |