summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2018-06-06 20:12:46 -0400
committerNeale Ranns <nranns@cisco.com>2018-06-07 02:24:18 +0000
commitd018870d1b02109fc8b328446f15312fdd2fcd11 (patch)
tree35094636c98306a2485daee0edf9f5abbf13a437
parentd0e812f2d49cf241f80ac020b6e697cd408f216b (diff)
Allow arp-input node to learn IPv4 neighbors from GARP packets
Change-Id: I86019f4ff9b0c8c633638fa23341d8ce49099ba6 Signed-off-by: John Lo <loj@cisco.com>
-rw-r--r--src/vnet/ethernet/arp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/ethernet/arp.c b/src/vnet/ethernet/arp.c
index 682bc2a2c92..203f6f7f01a 100644
--- a/src/vnet/ethernet/arp.c
+++ b/src/vnet/ethernet/arp.c
@@ -1163,6 +1163,11 @@ arp_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame)
clib_host_to_net_u16 (ETHERNET_ARP_OPCODE_request) &&
(dst_is_local0 == 0))
{
+ /* learn from GARP packet */
+ if (arp0->ip4_over_ethernet[0].ip4.as_u32 ==
+ arp0->ip4_over_ethernet[1].ip4.as_u32)
+ error0 = arp_learn (vnm, am, sw_if_index0,
+ &arp0->ip4_over_ethernet[0]);
goto drop1;
}