diff options
Diffstat (limited to 'vnet/vnet/ipsec/ipsec_input.c')
-rw-r--r-- | vnet/vnet/ipsec/ipsec_input.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/vnet/vnet/ipsec/ipsec_input.c b/vnet/vnet/ipsec/ipsec_input.c index 8b75c1255a7..809fe6da65d 100644 --- a/vnet/vnet/ipsec/ipsec_input.c +++ b/vnet/vnet/ipsec/ipsec_input.c @@ -18,6 +18,7 @@ #include <vnet/vnet.h> #include <vnet/api_errno.h> #include <vnet/ip/ip.h> +#include <vnet/feature/feature.h> #include <vnet/ipsec/ipsec.h> #include <vnet/ipsec/esp.h> @@ -187,10 +188,6 @@ ipsec_input_ip4_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * from_frame) { - ip4_main_t *i4m = &ip4_main; - ip_lookup_main_t *lm = &i4m->lookup_main; - vnet_feature_config_main_t *cm = - &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT]; u32 n_left_from, *from, next_index, *to_next; ipsec_main_t *im = &ipsec_main; @@ -222,9 +219,10 @@ ipsec_input_ip4_node_fn (vlib_main_t * vm, n_left_to_next -= 1; b0 = vlib_get_buffer (vm, bi0); - c0 = vnet_get_config_data (&cm->config_main, - &b0->current_config_index, - &next0, sizeof (c0[0])); + c0 = + vnet_feature_next_with_data (vnet_buffer (b0)->sw_if_index + [VLIB_RX], &next0, b0, + sizeof (c0[0])); spd0 = pool_elt_at_index (im->spds, c0->spd_index); @@ -323,10 +321,6 @@ VLIB_NODE_FUNCTION_MULTIARCH (ipsec_input_ip4_node, ipsec_input_ip4_node_fn) vlib_node_runtime_t * node, vlib_frame_t * from_frame) { - ip6_main_t *i6m = &ip6_main; - ip_lookup_main_t *lm = &i6m->lookup_main; - vnet_feature_config_main_t *cm = - &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT]; u32 n_left_from, *from, next_index, *to_next; ipsec_main_t *im = &ipsec_main; @@ -359,9 +353,10 @@ VLIB_NODE_FUNCTION_MULTIARCH (ipsec_input_ip4_node, ipsec_input_ip4_node_fn) n_left_to_next -= 1; b0 = vlib_get_buffer (vm, bi0); - c0 = vnet_get_config_data (&cm->config_main, - &b0->current_config_index, - &next0, sizeof (c0[0])); + c0 = + vnet_feature_next_with_data (vnet_buffer (b0)->sw_if_index + [VLIB_RX], &next0, b0, + sizeof (c0[0])); spd0 = pool_elt_at_index (im->spds, c0->spd_index); |