aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorNeale Ranns <neale.ranns@cisco.com>2017-01-09 14:33:38 +0100
committerNeale Ranns <nranns@cisco.com>2017-01-12 12:42:02 +0000
commit797235a6aacccdb1503374439e91eca245b48294 (patch)
tree3a9f13c727263e5513d19adfa90bfbacc6fda678 /src/vnet
parent3f14e2305755e53d586a791cb5cb197021cd5186 (diff)
Fix ARP on unnumbered interfaces (VPP-583)
Change-Id: Iea1e2c31c016c3bb6344f73173d082a2c548ffee Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ethernet/arp.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index b388e778ac8..0298541bb46 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/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)