/*
* we're looking for FIB entries that indicate the source
* is attached. There may be more specific non-attached
- * routes tht match the source, but these do not influence
+ * routes that match the source, but these do not influence
* whether we respond to an ARP request, i.e. they do not
* influence whether we are the correct way for the sender
* to reach us, they only affect how we reach the sender.
{
ethernet_arp_main_t *am = ðernet_arp_main;
ethernet_arp_ip4_entry_t *e;
+ adj_index_t ai;
/* *INDENT-OFF* */
pool_foreach (e, am->ip4_entry_pool,
}));
/* *INDENT-ON* */
- adj_glean_update_rewrite (adj_glean_get (FIB_PROTOCOL_IP4, sw_if_index));
+ ai = adj_glean_get (FIB_PROTOCOL_IP4, sw_if_index);
+
+ if (ADJ_INDEX_INVALID != ai)
+ adj_glean_update_rewrite (ai);
+}
+
+void
+send_ip4_garp (vlib_main_t * vm, const vnet_hw_interface_t * hi)
+{
+ ip4_main_t *i4m = &ip4_main;
+ ip4_address_t *ip4_addr =
+ ip4_interface_first_address (i4m, hi->sw_if_index, 0);
+
+ send_ip4_garp_w_addr (vm, ip4_addr, hi);
}
void
-send_ip4_garp (vlib_main_t * vm, vnet_hw_interface_t * hi)
+send_ip4_garp_w_addr (vlib_main_t * vm,
+ const ip4_address_t * ip4_addr,
+ const vnet_hw_interface_t * hi)
{
ip4_main_t *i4m = &ip4_main;
u32 sw_if_index = hi->sw_if_index;
- ip4_address_t *ip4_addr = ip4_interface_first_address (i4m, sw_if_index, 0);
if (ip4_addr)
{