diff options
author | Neale Ranns <nranns@cisco.com> | 2020-04-02 15:02:16 +0000 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2020-04-14 09:40:48 +0000 |
commit | d724e4f43b1d143a3f35492bce72fdc3e8af553e (patch) | |
tree | b458929e250006e18a7e0615a573e68b6e1a8178 /src/vnet/ip/ip_api.c | |
parent | dc3e9664858df680accca7324299b633bf60397d (diff) |
urpf: Unicast reverse Path Forwarding (plugin)
Type: feature
- move the IP4 code to plugin
- add ip6 support
- add suport for uRPF on TX
- add tests
Change-Id: I074c2debc486d3e79c12fad4b8dbd72c41e841a0
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip_api.c')
-rw-r--r-- | src/vnet/ip/ip_api.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 4f5b6b9d0a6..5c0784f9cb3 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -94,8 +94,6 @@ _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL, \ ip_source_and_port_range_check_add_del) \ _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL, \ ip_source_and_port_range_check_interface_add_del) \ -_(IP_SOURCE_CHECK_INTERFACE_ADD_DEL, \ - ip_source_check_interface_add_del) \ _(SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS, \ sw_interface_ip6_set_link_local_address) \ _(IP_REASSEMBLY_SET, ip_reassembly_set) \ @@ -1270,37 +1268,6 @@ static void REPLY_MACRO (VL_API_SW_INTERFACE_IP6_SET_LINK_LOCAL_ADDRESS_REPLY); } -typedef union -{ - u32 fib_index; -} ip4_source_check_config_t; - -static void - vl_api_ip_source_check_interface_add_del_t_handler - (vl_api_ip_source_check_interface_add_del_t * mp) -{ - vl_api_ip_source_check_interface_add_del_reply_t *rmp; - int rv; - u32 sw_if_index = ntohl (mp->sw_if_index); - u8 is_add = mp->is_add; - char *feature_name = - mp->loose ? "ip4-source-check-via-any" : "ip4-source-check-via-rx"; - - ip4_source_check_config_t config; - - VALIDATE_SW_IF_INDEX (mp); - - config.fib_index = - fib_table_get_index_for_sw_if_index (FIB_PROTOCOL_IP4, sw_if_index); - rv = - vnet_feature_enable_disable ("ip4-unicast", feature_name, sw_if_index, - is_add, &config, sizeof (config)); - BAD_SW_IF_INDEX_LABEL; - - REPLY_MACRO (VL_API_IP_SOURCE_CHECK_INTERFACE_ADD_DEL_REPLY); -} - - static void vl_api_ip_table_replace_begin_t_handler (vl_api_ip_table_replace_begin_t * mp) { |