dpdk: fix udp-encap for esp in transport mode 91/28391/1
authorAlexander Chernavin <achernavin@netgate.com>
Fri, 3 Apr 2020 14:18:44 +0000 (10:18 -0400)
committerAndrew Yourtchenko <ayourtch@gmail.com>
Thu, 13 Aug 2020 17:20:47 +0000 (17:20 +0000)
commitec50d9ff1ebd2b8f1158145413c22d47848eca58
treeb280284d491f317265a553682c106b549159f42c
parent8f8c625f2155b9151a6727235a50466add358397
dpdk: fix udp-encap for esp in transport mode

Now UDP encapsulation doesn't work in transport mode because:
 - the encrypt node misses filling of UDP header and it gets sent with
   all zeros;
 - the decrypt node misses filling of new IP header and it contains
   garbage data.

With this commit, fill UDP header during encryption and fill IP header
during decryption.

Change-Id: I87a7bd594f0e312b16d3e5eb19e568b4e3164d36
Type: fix
Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 82fc98fa4578dbbfb156effb11dea6a4e2d0b898)
src/plugins/dpdk/ipsec/esp_decrypt.c
src/plugins/dpdk/ipsec/esp_encrypt.c