summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorjackiechen1985 <xiaobo.chen@tieto.com>2018-12-11 04:13:22 +0800
committerNeale Ranns <nranns@cisco.com>2018-12-11 12:40:52 +0000
commit240f69aed757720cfb78a140aaa84eb31db198f4 (patch)
tree509a763900d30198a42061a429119b70532304f9 /src/vnet
parent5a2e278a09726be627b8310e03f0522d60aafedf (diff)
Fix [csit-dev] CSIT IPv6 IPSec transport mode tests are failing
Change-Id: I7893a8fd5b3e15063675597c0e9bd1cd0b49ef0e Signed-off-by: jackiechen1985 <xiaobo.chen@tieto.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/ipsec/esp_encrypt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c
index 88eda91bf7f..ff9c1e63097 100644
--- a/src/vnet/ipsec/esp_encrypt.c
+++ b/src/vnet/ipsec/esp_encrypt.c
@@ -311,7 +311,15 @@ esp_encrypt_inline (vlib_main_t * vm,
vnet_buffer (o_b0)->sw_if_index[VLIB_TX] =
vnet_buffer (i_b0)->sw_if_index[VLIB_TX];
}
- vlib_buffer_advance (i_b0, sizeof (ip4_header_t));
+
+ if (is_ip6)
+ {
+ vlib_buffer_advance (i_b0, sizeof (ip6_header_t));
+ }
+ else
+ {
+ vlib_buffer_advance (i_b0, sizeof (ip4_header_t));
+ }
}
ASSERT (sa0->crypto_alg < IPSEC_CRYPTO_N_ALG);