Allow arp-input node to learn IPv4 neighbors from GARP packets 26/12926/2
authorJohn Lo <loj@cisco.com>
Thu, 7 Jun 2018 00:12:46 +0000 (20:12 -0400)
committerNeale Ranns <nranns@cisco.com>
Thu, 7 Jun 2018 02:24:18 +0000 (02:24 +0000)
Change-Id: I86019f4ff9b0c8c633638fa23341d8ce49099ba6
Signed-off-by: John Lo <loj@cisco.com>
src/vnet/ethernet/arp.c

index 682bc2a..203f6f7 100644 (file)
@@ -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;
            }