diff options
author | Neale Ranns <nranns@cisco.com> | 2019-07-30 06:29:47 -0700 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2019-08-01 13:09:46 +0000 |
commit | 1ff56f00ca015e82ef29955986e503913d1c3b86 (patch) | |
tree | 4b60a938ec0dc326dc492c0cf289be008206458f /src/vnet/ethernet | |
parent | 67eb4bb47739431bcb34bad8f1d6e3743a5e17ff (diff) |
ethernet: Fix node ordering on ARP feautre ARC
Type: fix
Fixes: fe2fff37
this improves the tracing for dropped ARP packets
Change-Id: Iefd0391e349fc54f1beebda403b2349534b20c48
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ethernet')
-rw-r--r-- | src/vnet/ethernet/arp.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c index edf7656f1cb..86ad9f3decf 100644 --- a/src/vnet/ethernet/arp.c +++ b/src/vnet/ethernet/arp.c @@ -460,6 +460,8 @@ arp_enable (ethernet_arp_main_t * am, u32 sw_if_index) am->ethernet_arp_by_sw_if_index[sw_if_index].enabled = 1; vnet_feature_enable_disable ("arp", "arp-reply", sw_if_index, 1, NULL, 0); + vnet_feature_enable_disable ("arp", "arp-disabled", sw_if_index, 0, NULL, + 0); } static int @@ -478,6 +480,8 @@ arp_disable (ethernet_arp_main_t * am, u32 sw_if_index) if (!arp_is_enabled (am, sw_if_index)) return; + vnet_feature_enable_disable ("arp", "arp-disabled", sw_if_index, 1, NULL, + 0); vnet_feature_enable_disable ("arp", "arp-reply", sw_if_index, 0, NULL, 0); eai = &am->ethernet_arp_by_sw_if_index[sw_if_index]; @@ -1707,7 +1711,7 @@ VNET_FEATURE_ARC_INIT (arp_feat, static) = { .arc_name = "arp", .start_nodes = VNET_FEATURES ("arp-input"), - .last_in_arc = "arp-disabled", + .last_in_arc = "error-drop", .arc_index_ptr = ðernet_arp_main.feature_arc_index, }; @@ -3048,9 +3052,10 @@ send_ip4_garp_w_addr (vlib_main_t * vm, static clib_error_t * vnet_arp_delete_sw_interface (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) { + ethernet_arp_main_t *am = ðernet_arp_main; + if (!is_add && sw_if_index != ~0) { - ethernet_arp_main_t *am = ðernet_arp_main; ethernet_arp_ip4_entry_t *e; /* *INDENT-OFF* */ pool_foreach (e, am->ip4_entry_pool, ({ @@ -3063,6 +3068,12 @@ vnet_arp_delete_sw_interface (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) vnet_arp_unset_ip4_over_ethernet_internal (vnm, &args); })); /* *INDENT-ON* */ + arp_disable (am, sw_if_index); + } + else if (is_add) + { + vnet_feature_enable_disable ("arp", "arp-disabled", + sw_if_index, 1, NULL, 0); } return (NULL); |