aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/feature/feature.h8
-rw-r--r--src/vnet/ipsec/esp_encrypt.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/src/vnet/feature/feature.h b/src/vnet/feature/feature.h
index cbea6590942..cd016735aca 100644
--- a/src/vnet/feature/feature.h
+++ b/src/vnet/feature/feature.h
@@ -304,6 +304,14 @@ vnet_feature_next (u32 * next0, vlib_buffer_t * b0)
vnet_feature_next_with_data (next0, b0, 0);
}
+static_always_inline void
+vnet_feature_next_u16 (u16 * next0, vlib_buffer_t * b0)
+{
+ u32 next32;
+ vnet_feature_next_with_data (&next32, b0, 0);
+ *next0 = next32;
+}
+
static_always_inline int
vnet_device_input_have_features (u32 sw_if_index)
{
diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c
index 7df537a5555..e06babd92ef 100644
--- a/src/vnet/ipsec/esp_encrypt.c
+++ b/src/vnet/ipsec/esp_encrypt.c
@@ -320,10 +320,8 @@ esp_encrypt_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
if (is_tun)
{
/* we are on a ipsec tunnel's feature arc */
- u32 next0 = 0;
config_index = b[0]->current_config_index;
- vnet_feature_next (&next0, b[0]);
- next[0] = next0;
+ vnet_feature_next_u16 (&next[0], b[0]);
vnet_buffer (b[0])->ipsec.sad_index =
sa_index0 = ipsec_tun_protect_get_sa_out
(vnet_buffer (b[0])->ip.adj_index[VLIB_TX]);