|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
37 [URPF_MODE_STRICT] =
"ip4-rx-urpf-strict",
38 [URPF_MODE_LOOSE] =
"ip4-rx-urpf-loose",
41 [URPF_MODE_STRICT] =
"ip4-tx-urpf-strict",
42 [URPF_MODE_LOOSE] =
"ip4-tx-urpf-loose",
47 [URPF_MODE_STRICT] =
"ip6-rx-urpf-strict",
48 [URPF_MODE_LOOSE] =
"ip6-rx-urpf-loose",
51 [URPF_MODE_STRICT] =
"ip6-tx-urpf-strict",
52 [URPF_MODE_LOOSE] =
"ip6-tx-urpf-loose",
72 return (format (s, "%s", b));
77 return (
format (s,
"unknown"));
88 else if (unformat (input, b)) \
90 *mode = URPF_MODE_##a; \
109 if (URPF_MODE_OFF != old)
115 if (URPF_MODE_OFF !=
mode)
141 mode = URPF_MODE_STRICT;
236 .short_help =
"set urpf [ip4|ip6] [rx|tx] [off|strict|loose] <INTERFACE>",
261 else if (
unformat (line_input,
"del"))
263 else if (
unformat (line_input,
"add"))
311 .path =
"set urpf-accept",
313 .short_help =
"urpf-accept [table <table-id>] [add|del] <PREFIX>",
uword unformat_ip_prefix(unformat_input_t *input, va_list *args)
#define clib_error_return(e, args...)
void urpf_update(urpf_mode_t mode, u32 sw_if_index, ip_address_family_t af, vlib_dir_t dir)
static uword unformat_urpf_mode(unformat_input_t *input, va_list *args)
vl_api_tunnel_mode_t mode
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
uword unformat_ip_address_family(unformat_input_t *input, va_list *args)
static urpf_mode_t * urpf_cfgs[N_AF][VLIB_N_DIR]
Per-af, per-direction, per-interface uRPF configs.
@ FIB_SOURCE_URPF_EXEMPT
uRPF bypass/exemption.
void fib_table_entry_special_remove(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Remove a 'special' entry from the FIB.
u8 * format_urpf_mode(u8 *s, va_list *a)
vnet_main_t * vnet_get_main(void)
#define VLIB_CLI_COMMAND(x,...)
static clib_error_t * urpf_cli_accept(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * urpf_cli_update(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_cli_command_t set_interface_ip_source_check_command
(constructor) VLIB_CLI_COMMAND (set_interface_ip_source_check_command)
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
enum urpf_mode_t_ urpf_mode_t
static const char * urpf_feats[N_AF][VLIB_N_DIR][URPF_N_MODES]
fib_protocol_t fp_proto
protocol type
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
static vlib_cli_command_t urpf_accept_command
(constructor) VLIB_CLI_COMMAND (urpf_accept_command)
static const char * urpf_feat_arcs[N_AF][VLIB_N_DIR]
fib_node_index_t fib_table_entry_special_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags)
Add a 'special' entry to the FIB.
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
vl_api_interface_index_t sw_if_index
Aggregate type for a prefix.
enum ip_address_family_t_ ip_address_family_t
void ip_prefix_to_fib_prefix(const ip_prefix_t *ip_prefix, fib_prefix_t *fib_prefix)
convert from a LISP to a FIB prefix