summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2016-11-30 07:41:53 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-01 11:28:35 +0000
commit436d06b1c7d00e8c30ab055560724285a017290b (patch)
tree4dfd5c2204dd8ee58a898c112096f6c036ae2c59
parentde7f3a7791b4758fc0c2ea91dc66a27e179201ff (diff)
ARP un-unmbered called when no interfaces are unnumbered
Change-Id: I4bb60d6382f0955dbf4848225a9fd6985b906fbc Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
-rw-r--r--vnet/vnet/ethernet/arp.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/vnet/vnet/ethernet/arp.c b/vnet/vnet/ethernet/arp.c
index c6dbbc689b2..d0b7132ef74 100644
--- a/vnet/vnet/ethernet/arp.c
+++ b/vnet/vnet/ethernet/arp.c
@@ -812,7 +812,7 @@ unset_random_arp_entry (void)
vnet_arp_unset_ip4_over_ethernet (vnm, e->sw_if_index, &delme);
}
-static void
+static int
arp_unnumbered (vlib_buffer_t * p0,
u32 pi0, ethernet_header_t * eth0, u32 sw_if_index)
{
@@ -849,7 +849,10 @@ arp_unnumbered (vlib_buffer_t * p0,
}));
/* *INDENT-ON* */
- ASSERT (vec_len (broadcast_swifs));
+ /* If there are no interfaces un-unmbered to this interface,
+ we are done here. */
+ if (0 == vec_len (broadcast_swifs))
+ return 0;
/* Allocate buffering if we need it */
if (vec_len (broadcast_swifs) > 1)
@@ -954,6 +957,8 @@ arp_unnumbered (vlib_buffer_t * p0,
vec_free (broadcast_swifs);
vec_free (buffers);
+
+ return !0;
}
static uword
@@ -1154,7 +1159,10 @@ arp_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
goto drop2;
}
if (is_unnum0)
- arp_unnumbered (p0, pi0, eth0, conn_sw_if_index0);
+ {
+ if (!arp_unnumbered (p0, pi0, eth0, conn_sw_if_index0))
+ goto drop2;
+ }
else
vlib_buffer_advance (p0, -adj0->rewrite_header.data_bytes);
}