ip-neighbor: set link-type ARP on incomplete adjacencies
[vpp.git] / src / vnet / ip-neighbor / ip_neighbor.c
index 11684eb..d8c386d 100644 (file)
@@ -339,7 +339,7 @@ ip_neighbor_mk_incomplete (adj_index_t ai)
                          ethernet_build_rewrite (vnet_get_main (),
                                                  adj->
                                                  rewrite_header.sw_if_index,
-                                                 adj_get_link_type (ai),
+                                                 VNET_LINK_ARP,
                                                  VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST));
 }
 
@@ -976,9 +976,9 @@ ip_neighbor_advertise (vlib_main_t * vm,
   vnet_main_t *vnm = vnet_get_main ();
 
   if (type == IP46_TYPE_IP4 || type == IP46_TYPE_BOTH)
-    ip4_neighbor_advertise (vm, vnm, sw_if_index, &addr->ip4);
+    ip4_neighbor_advertise (vm, vnm, sw_if_index, (addr) ? &addr->ip4 : NULL);
   if (type == IP46_TYPE_IP6 || type == IP46_TYPE_BOTH)
-    ip6_neighbor_advertise (vm, vnm, sw_if_index, &addr->ip6);
+    ip6_neighbor_advertise (vm, vnm, sw_if_index, (addr) ? &addr->ip6 : NULL);
 }
 
 void