aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip-neighbor/ip4_neighbor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip-neighbor/ip4_neighbor.h')
-rw-r--r--src/vnet/ip-neighbor/ip4_neighbor.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/ip-neighbor/ip4_neighbor.h b/src/vnet/ip-neighbor/ip4_neighbor.h
index 8805beadf23..11309af82d5 100644
--- a/src/vnet/ip-neighbor/ip4_neighbor.h
+++ b/src/vnet/ip-neighbor/ip4_neighbor.h
@@ -37,6 +37,11 @@ ip4_neighbor_probe (vlib_main_t * vm,
vlib_buffer_t *b0;
u32 bi0;
+ hw_if0 = vnet_get_sup_hw_interface (vnm, adj0->rewrite_header.sw_if_index);
+
+ /* if (NULL == hw_if0->hw_address) */
+ /* return (NULL); */
+
/* Send ARP request. */
h0 = vlib_packet_template_get_packet (vm,
&ip4_main.ip4_arp_request_packet_template,
@@ -50,8 +55,6 @@ ip4_neighbor_probe (vlib_main_t * vm,
/* Add rewrite/encap string for ARP packet. */
vnet_rewrite_one_header (adj0[0], h0, sizeof (ethernet_header_t));
- hw_if0 = vnet_get_sup_hw_interface (vnm, adj0->rewrite_header.sw_if_index);
-
/* Src ethernet address in ARP header. */
mac_address_from_bytes (&h0->ip4_over_ethernet[0].mac, hw_if0->hw_address);