summaryrefslogtreecommitdiffstats
path: root/src/vnet/ethernet
diff options
context:
space:
mode:
authorEyal Bari <ebari@cisco.com>2017-03-30 03:05:06 +0300
committerEyal Bari <ebari@cisco.com>2017-03-30 03:23:37 +0300
commita0623f8d26501a230801908cd4bc38d67a35dd23 (patch)
treecae931d485151c72d81f52c4d9802c8284da2f71 /src/vnet/ethernet
parent340690e42f97cfd94c5941fbebad7bb0bee8f8d4 (diff)
BRIDGE-DOMAIN:enable arp term,mac/ip learning on local ints
we should not suppress arps on remote interface instead we should flood them to the local one used shg != 0 to identify packets from remote interfaces and disable arp term l2 input feature for them Change-Id: I701537c05df7451a25ccb5bfc9e2b03ea70cff20 Signed-off-by: Eyal Bari <ebari@cisco.com>
Diffstat (limited to 'src/vnet/ethernet')
-rw-r--r--src/vnet/ethernet/arp.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index 2f81da32400..711b7867fab 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -2222,6 +2222,10 @@ arp_term_l2bd (vlib_main_t * vm,
n_left_to_next -= 1;
p0 = vlib_get_buffer (vm, pi0);
+ // Terminate only local (SHG == 0) ARP
+ if (vnet_buffer (p0)->l2.shg != 0)
+ goto next_l2_feature;
+
eth0 = vlib_buffer_get_current (p0);
l3h0 = (u8 *) eth0 + vnet_buffer (p0)->l2.l2_len;
ethertype0 = clib_net_to_host_u16 (*(u16 *) (l3h0 - 2));
@@ -2273,8 +2277,8 @@ arp_term_l2bd (vlib_main_t * vm,
pending_resolution_t *mc;
ethernet_arp_main_t *am = &ethernet_arp_main;
uword *p = hash_get (am->mac_changes_by_address, 0);
- if (p && (vnet_buffer (p0)->l2.shg == 0))
- { // Only SHG 0 interface which is more likely local
+ if (p)
+ {
u32 next_index = p[0];
while (next_index != (u32) ~ 0)
{
@@ -2335,11 +2339,6 @@ arp_term_l2bd (vlib_main_t * vm,
/* Send ARP/ND reply back out input interface through l2-output */
vnet_buffer (p0)->sw_if_index[VLIB_TX] = sw_if_index0;
next0 = ARP_TERM_NEXT_L2_OUTPUT;
- /* Note that output to VXLAN tunnel will fail due to SHG which
- is probably desireable since ARP termination is not intended
- for ARP requests from other hosts. If output to VXLAN tunnel is
- required, however, can just clear the SHG in packet as follows:
- vnet_buffer(p0)->l2.shg = 0; */
vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
to_next, n_left_to_next, pi0,
next0);
@@ -2357,7 +2356,7 @@ arp_term_l2bd (vlib_main_t * vm,
sw_if_index0 = vnet_buffer (p0)->sw_if_index[VLIB_RX];
if (vnet_ip6_nd_term
(vm, node, p0, eth0, iph0, sw_if_index0,
- vnet_buffer (p0)->l2.bd_index, vnet_buffer (p0)->l2.shg))
+ vnet_buffer (p0)->l2.bd_index))
goto output_response;
}