aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-03-08 01:12:54 -0800
committerFlorin Coras <florin.coras@gmail.com>2017-03-08 21:21:59 +0000
commitd96bad8ceb2ca0b798434619c5c5d1a199ec6382 (patch)
tree00f9eab8c3ae84ac364b530fb84a9c85796d8388 /src/vnet/ethernet
parent25f635852aee76255f7210c43d43668a80fdccce (diff)
ARP resilience in the absence of IP config on input and output interfaces
Change-Id: Ia9c6790436f8f6337b5351e3017ef5e441a8a4e9 Signed-off-by: Neale Ranns <nranns@cisco.com> (cherry picked from commit 5e323329ed6ded6f6944c56069329207ad9069c0)
Diffstat (limited to 'src/vnet/ethernet')
-rw-r--r--src/vnet/ethernet/arp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index 8898d33b3cf..222415b0aa3 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -792,6 +792,7 @@ typedef enum
_ (missing_interface_address, "ARP missing interface address") \
_ (gratuitous_arp, "ARP probe or announcement dropped") \
_ (interface_no_table, "Interface is not mapped to an IP table") \
+ _ (interface_not_ip_enabled, "Interface is not IP enabled") \
typedef enum
{
@@ -1048,6 +1049,11 @@ arp_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
sw_if_index0 = vnet_buffer (p0)->sw_if_index[VLIB_RX];
+ /* not playing the ARP game if the interface is not IPv4 enabled */
+ error0 =
+ (im4->ip_enabled_by_sw_if_index[sw_if_index0] == 0 ?
+ ETHERNET_ARP_ERROR_interface_not_ip_enabled : error0);
+
if (error0)
goto drop2;