diff options
author | Neale Ranns <nranns@cisco.com> | 2019-04-18 17:18:12 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-04-19 02:36:45 +0000 |
commit | 9fdfcf32741551a0eaf11a27d822a9d8f0607832 (patch) | |
tree | 0a810a6fcb6cbce746111dce9b9054cd5c5cf2bb /src/vnet/ipsec/esp_encrypt.c | |
parent | fd2cd9c8993d646d025e05f18f36c9fc22776eb8 (diff) |
IPSEC: ESP IPv6 transport mode payload length incorrect (VPP-1653)
Change-Id: I8977100d7a22b50260858bd1ea9db419b53284ff
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/ipsec/esp_encrypt.c')
-rw-r--r-- | src/vnet/ipsec/esp_encrypt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c index e319a9628f4..f1153d92e8c 100644 --- a/src/vnet/ipsec/esp_encrypt.c +++ b/src/vnet/ipsec/esp_encrypt.c @@ -402,7 +402,9 @@ esp_encrypt_inline (vlib_main_t * vm, vlib_node_runtime_t * node, ip6_header_t *ip6 = (ip6_header_t *) (ip_hdr); *next_hdr_ptr = ip6->protocol; ip6->protocol = IP_PROTOCOL_IPSEC_ESP; - ip6->payload_length = payload_len + hdr_len - l2_len - ip_len; + ip6->payload_length = + clib_host_to_net_u16 (payload_len + hdr_len - l2_len - + ip_len); } else { |