diff options
author | Klement Sekera <ksekera@cisco.com> | 2018-06-15 12:44:16 +0200 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-07-04 17:37:22 +0000 |
commit | 64526229981143019ab81133c0b4fad9ab618ac9 (patch) | |
tree | 5a1fc12133169f8bcb8b11e800cecb14a55b7f94 /src | |
parent | 6922040caf01191f9a839e5b8bbe4ca9c1840768 (diff) |
fix VPP-1312 Invalid UDP packet length in ipsec
Change-Id: Ibfd0a2e7010e6e74c32244c538f60e0713bea03f
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/ipsec/esp_encrypt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/ipsec/esp_encrypt.c b/src/vnet/ipsec/esp_encrypt.c index 0ce5e54aaeb..5f633011491 100644 --- a/src/vnet/ipsec/esp_encrypt.c +++ b/src/vnet/ipsec/esp_encrypt.c @@ -393,7 +393,8 @@ esp_encrypt_node_fn (vlib_main_t * vm, if (sa0->udp_encap) { ouh0->udp.length = - clib_host_to_net_u16 (oh0->ip4.length - + clib_host_to_net_u16 (clib_net_to_host_u16 + (oh0->ip4.length) - ip4_header_bytes (&oh0->ip4)); } } |