aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip-neighbor/ip4_neighbor.h
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-03-15 14:42:30 +0000
committerNeale Ranns <neale@graphiant.com>2021-03-21 18:55:01 +0000
commitbd8e43dfa045b4aec4ecf4ad3e5503924b5c9c38 (patch)
treefe91b63cc88910c5497dd34a0f3c6e1d20a3ea9e /src/vnet/ip-neighbor/ip4_neighbor.h
parent8d8150262b00435c365a43c8f859584901736aff (diff)
gre: Multipoint GRE fixes
Type: fix - the CLI was broken when a nh-table-id was present, since it overwrote the next-hop address - bouncing interface state stacked the adjacencies on the tunnel's destination (which is all zeros) - don't crash in the switch path if the interface has no hw-address Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I1ba9fdc9b2185899b753a2d40f23afa847a3ef4f
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);