IPv6 ND Router discovery data plane (VPP-1095)
[vpp.git] / src / vnet / ip / ip6_forward.c
index 4fd7129..eb7667b 100644 (file)
@@ -1548,9 +1548,10 @@ ip6_discover_neighbor_inline (vlib_main_t * vm,
             * Choose source address based on destination lookup
             * adjacency.
             */
-           if (ip6_src_address_for_packet (lm,
-                                           sw_if_index0,
-                                           &h0->ip.src_address))
+           if (!ip6_src_address_for_packet (lm,
+                                            sw_if_index0,
+                                            &ip0->dst_address,
+                                            &h0->ip.src_address))
              {
                /* There is no address on the interface */
                p0->error =
@@ -1744,7 +1745,8 @@ ip6_probe_neighbor (vlib_main_t * vm, ip6_address_t * dst, u32 sw_if_index)
   if (adj->lookup_next_index == IP_LOOKUP_NEXT_REWRITE)
     {
       adj_unlock (ai);
-      ai = adj_glean_add_or_lock (FIB_PROTOCOL_IP6, sw_if_index, &nh);
+      ai = adj_glean_add_or_lock (FIB_PROTOCOL_IP6,
+                                 VNET_LINK_IP6, sw_if_index, &nh);
       adj = adj_get (ai);
     }