X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip6_forward.c;h=588cd0675a4bac8a79b566db61043f8b0bda4b91;hb=756cd9441752fc8f84104c9ee19099506ba89f85;hp=4fd7129e4080f0ab7bdeef3870ca51b20022d79c;hpb=acbde664374303027e261ac096647592ca929f03;p=vpp.git diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index 4fd7129e408..588cd0675a4 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -432,8 +432,9 @@ ip6_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) vlib_main_t *vm = vlib_get_main (); ip6_neighbor_sw_interface_add_del (vnm, sw_if_index, 0 /* is_add */ ); + vnet_sw_interface_update_unnumbered (sw_if_index, ~0, 0); /* *INDENT-OFF* */ - foreach_ip_interface_address (lm6, ia, sw_if_index, 1 /* honor unnumbered */, + foreach_ip_interface_address (lm6, ia, sw_if_index, 0, ({ address = ip_interface_address_get_address (lm6, ia); ip6_add_del_interface_address(vm, sw_if_index, address, ia->address_length, 1); @@ -974,12 +975,15 @@ ip6_urpf_loose_check (ip6_main_t * im, vlib_buffer_t * b, ip6_header_t * i) { const load_balance_t *lb0; index_t lbi; + u32 fib_index; - lbi = ip6_fib_table_fwding_lookup_with_if_index (im, - vnet_buffer - (b)->sw_if_index[VLIB_RX], - &i->src_address); + fib_index = vec_elt (im->fib_index_by_sw_if_index, + vnet_buffer (b)->sw_if_index[VLIB_RX]); + fib_index = + (vnet_buffer (b)->sw_if_index[VLIB_TX] == (u32) ~ 0) ? + fib_index : vnet_buffer (b)->sw_if_index[VLIB_TX]; + lbi = ip6_fib_table_fwding_lookup (im, fib_index, &i->src_address); lb0 = load_balance_get (lbi); return (fib_urpf_check_size (lb0->lb_urpf)); @@ -1351,7 +1355,6 @@ VLIB_REGISTER_NODE (ip6_local_node, static) = [IP_LOCAL_NEXT_PUNT] = "ip6-punt", [IP_LOCAL_NEXT_UDP_LOOKUP] = "ip6-udp-lookup", [IP_LOCAL_NEXT_ICMP] = "ip6-icmp-input", - [IP_LOCAL_NEXT_REASSEMBLY] = "ip6-reassembly", }, }; /* *INDENT-ON* */ @@ -1548,9 +1551,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 +1748,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); } @@ -2694,7 +2699,7 @@ ip6_hbh_register_option (u8 option, ip6_main_t *im = &ip6_main; ip6_hop_by_hop_main_t *hm = &ip6_hop_by_hop_main; - ASSERT (option < ARRAY_LEN (hm->options)); + ASSERT ((u32) option < ARRAY_LEN (hm->options)); /* Already registered */ if (hm->options[option]) @@ -2715,7 +2720,7 @@ ip6_hbh_unregister_option (u8 option) ip6_main_t *im = &ip6_main; ip6_hop_by_hop_main_t *hm = &ip6_hop_by_hop_main; - ASSERT (option < ARRAY_LEN (hm->options)); + ASSERT ((u32) option < ARRAY_LEN (hm->options)); /* Not registered */ if (!hm->options[option])