Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
| inline |
side by side
fix VPP-1312 Invalid UDP packet length in ipsec
[vpp.git]
/
src
/
vnet
/
ipsec
/
esp_encrypt.c
diff --git
a/src/vnet/ipsec/esp_encrypt.c
b/src/vnet/ipsec/esp_encrypt.c
index
0ce5e54
..
5f63301
100644
(file)
--- 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));
}
}