summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-01-09 14:33:38 +0100
committerDave Barach <openvpp@barachs.net>2017-01-09 20:58:37 +0000
commitbf2fcad04abd30eb04ca00173efc886e2043a11e (patch)
tree713bf4a71b8f9750a1b43d600f241da6c56921e2
parent2d7e16330f9c3da56798e00e434b75ee35f71db2 (diff)
Fix ARP on unnumbered interfaces (VPP-583)
Change-Id: Iea1e2c31c016c3bb6344f73173d082a2c548ffee Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
-rw-r--r--vnet/vnet/ethernet/arp.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/vnet/vnet/ethernet/arp.c b/vnet/vnet/ethernet/arp.c
index b388e778ac8..0298541bb46 100644
--- a/vnet/vnet/ethernet/arp.c
+++ b/vnet/vnet/ethernet/arp.c
@@ -1043,12 +1043,25 @@ arp_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
src_flags = fib_entry_get_flags (src_fei);
if (!((FIB_ENTRY_FLAG_ATTACHED & src_flags) ||
- (FIB_ENTRY_FLAG_CONNECTED & src_flags)) ||
- sw_if_index0 != fib_entry_get_resolving_interface (src_fei))
+ (FIB_ENTRY_FLAG_CONNECTED & src_flags)))
{
+ /*
+ * The packet was sent from an address that is not connected nor attached
+ * i.e. it is not from an address that is covered by a link's sub-net,
+ * nor is it a already learned host resp.
+ */
error0 = ETHERNET_ARP_ERROR_l3_src_address_not_local;
goto drop2;
}
+ if (sw_if_index0 != fib_entry_get_resolving_interface (src_fei))
+ {
+ /*
+ * The interface the ARP was received on is not the interface
+ * on which the covering prefix is configured. Maybe this is a case
+ * for unnumbered.
+ */
+ is_unnum0 = 1;
+ }
/* Reject requests/replies with our local interface address. */
if (FIB_ENTRY_FLAG_LOCAL & src_flags)