Mcast rewrite optimisations
[vpp.git] / src / vnet / ip / ip6_neighbor.c
index 0df29c6..8e44402 100644 (file)
@@ -672,10 +672,10 @@ ip6_ethernet_update_adjacency (vnet_main_t * vnm, u32 sw_if_index, u32 ai)
         * Complete the remaining fields of the adj's rewrite to direct the
         * complete of the rewrite at switch time by copying in the IP
         * dst address's bytes.
-        * Ofset is 2 bytes into the desintation address. And we write 4 bytes.
+        * Ofset is 2 bytes into the desintation address.
         */
        offset = vec_len (rewrite) - 2;
-       adj_mcast_update_rewrite (ai, rewrite, offset, 0xffffffff);
+       adj_mcast_update_rewrite (ai, rewrite, offset);
 
        break;
       }
@@ -4670,11 +4670,23 @@ ethernet_ndp_change_mac (u32 sw_if_index)
 }
 
 void
-send_ip6_na (vlib_main_t * vm, vnet_hw_interface_t * hi)
+send_ip6_na (vlib_main_t * vm, const vnet_hw_interface_t * hi)
 {
   ip6_main_t *i6m = &ip6_main;
   u32 sw_if_index = hi->sw_if_index;
   ip6_address_t *ip6_addr = ip6_interface_first_address (i6m, sw_if_index);
+
+  send_ip6_na_w_addr (vm, ip6_addr, hi);
+}
+
+void
+send_ip6_na_w_addr (vlib_main_t * vm,
+                   const ip6_address_t * ip6_addr,
+                   const vnet_hw_interface_t * hi)
+{
+  ip6_main_t *i6m = &ip6_main;
+  u32 sw_if_index = hi->sw_if_index;
+
   if (ip6_addr)
     {
       clib_warning