aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/arp
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2020-11-04 10:02:03 +0100
committerDamjan Marion <dmarion@me.com>2020-11-05 12:36:31 +0000
commit6178bdafa6a318d50cc8ad82f07c6c798c7024ef (patch)
tree16cc8c40ad15444d1a4bfc4c4f5e9595ee379648 /src/vnet/arp
parent9c4a582dca7c819ebf3eccd70482d7a03853b51e (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/arp')
-rw-r--r--src/vnet/arp/arp.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/vnet/arp/arp.c b/src/vnet/arp/arp.c
index 8b57376522d..e02f3d8b52a 100644
--- a/src/vnet/arp/arp.c
+++ b/src/vnet/arp/arp.c
@@ -855,17 +855,8 @@ static clib_error_t *
vnet_arp_add_del_sw_interface (vnet_main_t * vnm, u32 sw_if_index, u32 is_add)
{
ethernet_arp_main_t *am = &ethernet_arp_main;
-
- if (!is_add && sw_if_index != ~0)
- {
- arp_disable (am, sw_if_index);
- }
- else if (is_add)
- {
- vnet_feature_enable_disable ("arp", "arp-disabled",
- sw_if_index, 1, NULL, 0);
- }
-
+ if (is_add)
+ arp_disable (am, sw_if_index);
return (NULL);
}