- if (0 == arp0->ip4_over_ethernet[0].ip4.as_u32 ||
- (arp0->ip4_over_ethernet[0].ip4.as_u32 ==
- arp0->ip4_over_ethernet[1].ip4.as_u32))
- {
- error0 = ETHERNET_ARP_ERROR_gratuitous_arp;
- goto drop2;
- }
- /* See if proxy arp is configured for the address */
- if (is_request0)
- {
- vnet_sw_interface_t * si;
- u32 this_addr = clib_net_to_host_u32
- (arp0->ip4_over_ethernet[1].ip4.as_u32);
- u32 fib_index0;
-
- si = vnet_get_sw_interface (vnm, sw_if_index0);
-
- if (!(si->flags & VNET_SW_INTERFACE_FLAG_PROXY_ARP))
- goto drop2;
-
- fib_index0 = vec_elt (im4->fib_index_by_sw_if_index,
- sw_if_index0);
-
- vec_foreach (pa, am->proxy_arps)
- {
- u32 lo_addr = clib_net_to_host_u32 (pa->lo_addr);
- u32 hi_addr = clib_net_to_host_u32 (pa->hi_addr);
-
- /* an ARP request hit in the proxy-arp table? */
- if ((this_addr >= lo_addr && this_addr <= hi_addr) &&
- (fib_index0 == pa->fib_index))
- {
- eth0 = ethernet_buffer_get_header (p0);
- proxy_src.as_u32 =
- arp0->ip4_over_ethernet[1].ip4.data_u32;
-
- /*
- * Rewind buffer, direct code above not to
- * think too hard about it.
- * $$$ is the answer ever anything other than
- * vlib_buffer_reset(..)?
- */
- ifa0 = 0;
- if_addr0 = &proxy_src;
- vlib_buffer_reset (p0);
- n_proxy_arp_replies_sent++;
- goto send_reply;
- }
- }
- }
-
- drop2:
+ if (0 == arp0->ip4_over_ethernet[0].ip4.as_u32 ||
+ (arp0->ip4_over_ethernet[0].ip4.as_u32 ==
+ arp0->ip4_over_ethernet[1].ip4.as_u32))
+ {
+ error0 = ETHERNET_ARP_ERROR_gratuitous_arp;
+ goto drop2;
+ }
+ /* See if proxy arp is configured for the address */
+ if (is_request0)
+ {
+ vnet_sw_interface_t *si;
+ u32 this_addr = clib_net_to_host_u32
+ (arp0->ip4_over_ethernet[1].ip4.as_u32);
+ u32 fib_index0;
+
+ si = vnet_get_sw_interface (vnm, sw_if_index0);
+
+ if (!(si->flags & VNET_SW_INTERFACE_FLAG_PROXY_ARP))
+ goto drop2;
+
+ fib_index0 = vec_elt (im4->fib_index_by_sw_if_index,
+ sw_if_index0);
+
+ vec_foreach (pa, am->proxy_arps)
+ {
+ u32 lo_addr = clib_net_to_host_u32 (pa->lo_addr);
+ u32 hi_addr = clib_net_to_host_u32 (pa->hi_addr);
+
+ /* an ARP request hit in the proxy-arp table? */
+ if ((this_addr >= lo_addr && this_addr <= hi_addr) &&
+ (fib_index0 == pa->fib_index))
+ {
+ eth0 = ethernet_buffer_get_header (p0);
+ proxy_src.as_u32 =
+ arp0->ip4_over_ethernet[1].ip4.data_u32;
+
+ /*
+ * Rewind buffer, direct code above not to
+ * think too hard about it.
+ * $$$ is the answer ever anything other than
+ * vlib_buffer_reset(..)?
+ */
+ ifa0 = 0;
+ if_addr0 = &proxy_src;
+ vlib_buffer_reset (p0);
+ n_proxy_arp_replies_sent++;
+ goto send_reply;
+ }
+ }
+ }
+
+ drop2: