diff options
author | Neale Ranns <nranns@cisco.com> | 2020-03-11 10:57:54 -0400 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-03-13 07:20:42 +0000 |
commit | c27b43673237c3971c1c170646b531728e0d8eb1 (patch) | |
tree | 637f7459d33c327cb00a082a83d714d4919ac9e1 /src | |
parent | de57ca3eac6a045956e0699625c8d9d2dfe1daad (diff) |
dpdk-ipsec: Fix for multipoint IPSEC
Type: fix
fetch the sa_index from the correct location
Change-Id: I351035ee0226c47585995ff9122320fd5c73ec53
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/dpdk/ipsec/esp_encrypt.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/dpdk/ipsec/esp_encrypt.c b/src/plugins/dpdk/ipsec/esp_encrypt.c index 7da5cf8876f..c024f97e1e2 100644 --- a/src/plugins/dpdk/ipsec/esp_encrypt.c +++ b/src/plugins/dpdk/ipsec/esp_encrypt.c @@ -24,6 +24,7 @@ #include <vnet/udp/udp.h> #include <dpdk/buffer.h> #include <dpdk/ipsec/ipsec.h> +#include <vnet/ipsec/ipsec_tun.h> #include <dpdk/device/dpdk.h> #include <dpdk/device/dpdk_priv.h> @@ -217,11 +218,10 @@ dpdk_esp_encrypt_inline (vlib_main_t * vm, if (is_tun) { - u32 tmp; /* we are on a ipsec tunnel's feature arc */ - sa_index0 = *(u32 *) vnet_feature_next_with_data (&tmp, b0, - sizeof - (sa_index0)); + vnet_buffer (b0)->ipsec.sad_index = + sa_index0 = ipsec_tun_protect_get_sa_out + (vnet_buffer (b0)->ip.adj_index[VLIB_TX]); } else sa_index0 = vnet_buffer (b0)->ipsec.sad_index; |