From 0f438df9918911a976751f2391421cc8b4b6fdb7 Mon Sep 17 00:00:00 2001 From: AkshayaNadahalli Date: Fri, 10 Feb 2017 10:54:16 +0530 Subject: Out-of-tree Build Error fix File vnet/fib/fib_urpf_list.h was included in vnet/fib/ip6_fib.h but was exported to be installed in /usr/include/vnet. So out-of-tree builds relying on an installed package was failing. Fix is to inlcude fib_urpf_list.h in source file rather than including it in header file. Change-Id: Iae39c1d9417dbd31ee67fa1bd2d1915d5e813c73 Signed-off-by: AkshayaNadahalli --- src/vnet/ip/ip6_forward.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/vnet/ip') diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index ae5c19b6..c15683e2 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -42,6 +42,7 @@ #include /* for ethernet_header_t */ #include /* for srp_hw_interface_class */ #include +#include /* for FIB uRPF check */ #include #include #include @@ -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) { -- cgit 1.2.3-korg