diff options
-rw-r--r-- | src/vnet/fib/ip6_fib.h | 22 | ||||
-rw-r--r-- | src/vnet/ip/ip6_forward.c | 20 |
2 files changed, 20 insertions, 22 deletions
diff --git a/src/vnet/fib/ip6_fib.h b/src/vnet/fib/ip6_fib.h index e460e2ffd09..af864a75975 100644 --- a/src/vnet/fib/ip6_fib.h +++ b/src/vnet/fib/ip6_fib.h @@ -20,7 +20,6 @@ #include <vnet/ip/format.h> #include <vnet/fib/fib_entry.h> #include <vnet/fib/fib_table.h> -#include <vnet/fib/fib_urpf_list.h> #include <vnet/ip/lookup.h> #include <vnet/dpo/load_balance.h> @@ -68,27 +67,6 @@ extern void ip6_fib_table_walk(u32 fib_index, void *ctx); /** - * @brief returns number of links on which src is reachable. - */ -always_inline int -ip6_urpf_loose_check (ip6_main_t * im, - vlib_buffer_t * b, - ip6_header_t * i) -{ - const load_balance_t *lb0; - index_t lbi; - - lbi = ip6_fib_table_fwding_lookup_with_if_index( - im, - vnet_buffer (b)->sw_if_index[VLIB_RX], - &i->src_address); - - lb0 = load_balance_get(lbi); - - return (fib_urpf_check_size (lb0->lb_urpf)); -} - -/** * @brief return the DPO that the LB stacks on. */ always_inline u32 diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index ae5c19b6966..c15683e2390 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -42,6 +42,7 @@ #include <vnet/ethernet/ethernet.h> /* for ethernet_header_t */ #include <vnet/srp/srp.h> /* for srp_hw_interface_class */ #include <vppinfra/cache.h> +#include <vnet/fib/fib_urpf_list.h> /* for FIB uRPF check */ #include <vnet/fib/ip6_fib.h> #include <vnet/mfib/ip6_mfib.h> #include <vnet/dpo/load_balance.h> @@ -1316,6 +1317,25 @@ ip6_locate_header (vlib_buffer_t * p0, return (next_proto); } +/** + * @brief returns number of links on which src is reachable. + */ +always_inline int +ip6_urpf_loose_check (ip6_main_t * im, vlib_buffer_t * b, ip6_header_t * i) +{ + const load_balance_t *lb0; + index_t lbi; + + lbi = ip6_fib_table_fwding_lookup_with_if_index (im, + vnet_buffer + (b)->sw_if_index[VLIB_RX], + &i->src_address); + + lb0 = load_balance_get (lbi); + + return (fib_urpf_check_size (lb0->lb_urpf)); +} + static uword ip6_local (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { |