Allow providers to override glean behaviour
[vpp.git] / src / vnet / ip / ip6_neighbor.c
index 61d2983..4c1b1bb 100644 (file)
@@ -4258,6 +4258,7 @@ ethernet_ndp_change_mac (u32 sw_if_index)
 {
   ip6_neighbor_main_t *nm = &ip6_neighbor_main;
   ip6_neighbor_t *n;
+  adj_index_t ai;
 
   /* *INDENT-OFF* */
   pool_foreach (n, nm->neighbor_pool,
@@ -4271,7 +4272,10 @@ ethernet_ndp_change_mac (u32 sw_if_index)
   }));
   /* *INDENT-ON* */
 
-  adj_glean_update_rewrite (adj_glean_get (FIB_PROTOCOL_IP6, sw_if_index));
+  ai = adj_glean_get (FIB_PROTOCOL_IP6, sw_if_index);
+
+  if (ADJ_INDEX_INVALID != ai)
+    adj_glean_update_rewrite (ai);
 }
 
 void