diff options
author | Benoît Ganne <bganne@cisco.com> | 2020-11-04 10:02:03 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-11-05 12:36:31 +0000 |
commit | 6178bdafa6a318d50cc8ad82f07c6c798c7024ef (patch) | |
tree | 16cc8c40ad15444d1a4bfc4c4f5e9595ee379648 /src/vnet/config.c | |
parent | 9c4a582dca7c819ebf3eccd70482d7a03853b51e (diff) |
feature: reset interface feature arc on interface deletion
When removing an interface we must reset all per-interface per-feature
arc data to ensure we do not get wrong feature arc config data when the
sw_if_index is recycled.
Type: fix
Change-Id: I8c9d850d7c62b7b77193da4258ab5fb9bdda85a6
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/config.c')
-rw-r--r-- | src/vnet/config.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vnet/config.c b/src/vnet/config.c index 4e9fa36dfc3..c9d4909cdeb 100644 --- a/src/vnet/config.c +++ b/src/vnet/config.c @@ -241,6 +241,14 @@ vnet_get_config_heap (vnet_config_main_t * cm, u32 ci) return heap_elt_at_index (cm->config_string_heap, ci); } +void +vnet_config_del (vnet_config_main_t * cm, u32 config_id) +{ + u32 *p = vnet_get_config_heap (cm, config_id); + vnet_config_t *old = pool_elt_at_index (cm->config_pool, p[-1]); + remove_reference (cm, old); +} + u32 vnet_config_modify_end_node (vlib_main_t * vm, vnet_config_main_t * cm, |