aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vnet/ethernet/arp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index c8d15784d71..c22be3fc809 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -1635,6 +1635,9 @@ vnet_arp_unset_ip4_over_ethernet_internal (vnet_main_t * vnm,
ethernet_arp_ip4_entry_t *e;
ethernet_arp_interface_t *eai;
+ if (vec_len (am->ethernet_arp_by_sw_if_index) <= args->sw_if_index)
+ return 0;
+
eai = &am->ethernet_arp_by_sw_if_index[args->sw_if_index];
e = arp_entry_find (eai, &args->a.ip4);
@@ -1659,6 +1662,9 @@ vnet_arp_flush_ip4_over_ethernet_internal (vnet_main_t * vnm,
ethernet_arp_ip4_entry_t *e;
ethernet_arp_interface_t *eai;
+ if (vec_len (am->ethernet_arp_by_sw_if_index) <= args->sw_if_index)
+ return 0;
+
eai = &am->ethernet_arp_by_sw_if_index[args->sw_if_index];
e = arp_entry_find (eai, &args->a.ip4);
@@ -1692,6 +1698,7 @@ vnet_arp_populate_ip4_over_ethernet_internal (vnet_main_t * vnm,
ethernet_arp_ip4_entry_t *e;
ethernet_arp_interface_t *eai;
+ vec_validate (am->ethernet_arp_by_sw_if_index, args->sw_if_index);
eai = &am->ethernet_arp_by_sw_if_index[args->sw_if_index];
e = arp_entry_find (eai, &args->a.ip4);