73 #define foreach_urpf_error \ 74 _(DROP, "uRPF Drop") \ 78 #define _(a,b) URPF_ERROR_##a, 109 u32 pass0, lb_index0, pass1, lb_index1;
111 u32 fib_index0, fib_index1;
147 &lb_index0, &lb_index1);
177 if (URPF_MODE_STRICT == mode)
202 pass0 |= b[0]->
flags & VNET_BUFFER_F_LOCALLY_ORIGINATED;
203 pass1 |= b[1]->
flags & VNET_BUFFER_F_LOCALLY_ORIGINATED;
227 if (b[0]->
flags & VLIB_BUFFER_IS_TRACED)
234 if (b[1]->
flags & VLIB_BUFFER_IS_TRACED)
249 u32 pass0, lb_index0, fib_index0;
288 if (URPF_MODE_STRICT == mode)
299 pass0 |= b[0]->
flags & VNET_BUFFER_F_LOCALLY_ORIGINATED;
313 if (b[0]->
flags & VLIB_BUFFER_IS_TRACED)
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
static u32 ip6_fib_table_fwding_lookup(u32 fib_index, const ip6_address_t *dst)
static int fib_urpf_check_size(index_t ui)
Data-Plane function to check the size of an uRPF list, (i.e.
vl_api_wireguard_peer_flags_t flags
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static int fib_urpf_check(index_t ui, u32 sw_if_index)
Data-Plane function to check an input interface against an uRPF list.
u32 * fib_index_by_sw_if_index
Table index indexed by software interface.
static uword ip4_address_is_multicast(const ip4_address_t *a)
vlib_error_t * errors
Vector of errors for this node.
static_always_inline uword urpf_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, ip_address_family_t af, vlib_dir_t dir, urpf_mode_t mode)
static_always_inline void vnet_feature_next_u16(u16 *next0, vlib_buffer_t *b0)
#define static_always_inline
description fragment has unexpected format
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
static_always_inline void ip4_fib_forwarding_lookup_x2(u32 fib_index0, u32 fib_index1, const ip4_address_t *addr0, const ip4_address_t *addr1, index_t *lb0, index_t *lb1)
static u8 * format_urpf_trace(u8 *s, va_list *va)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
vl_api_tunnel_mode_t mode
static_always_inline void vlib_buffer_enqueue_to_next(vlib_main_t *vm, vlib_node_runtime_t *node, u32 *buffers, u16 *nexts, uword count)
#define vlib_prefetch_buffer_data(b, type)
vlib_main_t vlib_node_runtime_t * node
index_t lb_urpf
This is the index of the uRPF list for this LB.
static load_balance_t * load_balance_get(index_t lbi)
static index_t ip4_fib_forwarding_lookup(u32 fib_index, const ip4_address_t *addr)
static uword ip6_address_is_multicast(const ip6_address_t *a)
enum ip_address_family_t_ ip_address_family_t
#define foreach_urpf_error
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
VLIB buffer representation.
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static uword ip4_address_is_global_broadcast(const ip4_address_t *a)
ip4_main_t ip4_main
Global ip4 main structure.
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static_always_inline void vlib_get_buffers(vlib_main_t *vm, u32 *bi, vlib_buffer_t **b, int count)
Translate array of buffer indices into buffer pointers.
u32 * fib_index_by_sw_if_index
vl_api_interface_index_t sw_if_index
enum urpf_error_t_ urpf_error_t
enum urpf_mode_t_ urpf_mode_t