diff options
Diffstat (limited to 'src/vnet/ip-neighbor/ip6_neighbor.c')
-rw-r--r-- | src/vnet/ip-neighbor/ip6_neighbor.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vnet/ip-neighbor/ip6_neighbor.c b/src/vnet/ip-neighbor/ip6_neighbor.c index 576ae570c0f..ca8aed3d4ca 100644 --- a/src/vnet/ip-neighbor/ip6_neighbor.c +++ b/src/vnet/ip-neighbor/ip6_neighbor.c @@ -217,13 +217,14 @@ ip6_discover_neighbor_inline (vlib_main_t * vm, * Choose source address based on destination lookup * adjacency. */ - if (!fib_sas6_get (sw_if_index0, &ip0->dst_address, &src) || - !ip6_sas_by_sw_if_index (sw_if_index0, &ip0->dst_address, &src)) + const ip6_address_t *ll = ip6_get_link_local_address (sw_if_index0); + if (!ll) { /* There is no address on the interface */ p0->error = node->errors[IP6_NEIGHBOR_ERROR_NO_SOURCE_ADDRESS]; continue; } + ip6_address_copy (&src, ll); b0 = ip6_neighbor_probe (vm, vnm, sw_if_index0, thread_index, &src, &ip0->dst_address); @@ -263,7 +264,6 @@ ip6_glean (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) return (ip6_discover_neighbor_inline (vm, node, frame, 1)); } -/* *INDENT-OFF* */ VLIB_REGISTER_NODE (ip6_glean_node) = { .function = ip6_glean, @@ -294,7 +294,6 @@ VLIB_REGISTER_NODE (ip6_discover_neighbor_node) = [IP6_NBR_NEXT_REPLY_TX] = "ip6-rewrite-mcast", }, }; -/* *INDENT-ON* */ /* Template used to generate IP6 neighbor solicitation packets. */ vlib_packet_template_t ip6_neighbor_packet_template; @@ -338,7 +337,7 @@ ip6_nd_main_loop_enter (vlib_main_t * vm) { vlib_thread_main_t *tm = &vlib_thread_main; - throttle_init (&nd_throttle, tm->n_vlib_mains, 1e-3); + throttle_init (&nd_throttle, tm->n_vlib_mains, THROTTLE_BITS, 1e-3); return 0; } |