From 64526229981143019ab81133c0b4fad9ab618ac9 Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Fri, 15 Jun 2018 12:44:16 +0200 Subject: fix VPP-1312 Invalid UDP packet length in ipsec Change-Id: Ibfd0a2e7010e6e74c32244c538f60e0713bea03f Signed-off-by: Klement Sekera --- src/vnet/ipsec/esp_encrypt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vnet/ipsec') 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)); } } -- cgit 1.2.3-korg