xfrm: Support crypto offload for outbound IPv4 UDP-encapsulated ESP packet
authorMike Yu <yumike@google.com>
Fri, 12 Jul 2024 02:51:25 +0000 (10:51 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 12 Jul 2024 06:43:29 +0000 (08:43 +0200)
commit447bc4b1906f100e65c662528b7ae4e1dc2e9b80
tree4ea6ca4711e34aa7695c69e4c020c5f9ec8deae0
parent4ecbac84b5b8c4ad033b473782582568810baf61
xfrm: Support crypto offload for outbound IPv4 UDP-encapsulated ESP packet

esp_xmit() is already able to handle UDP encapsulation through the call to
esp_output_head(). However, the ESP header and the outer IP header
are not correct and need to be corrected.

Test: Enabled both dir=in/out IPsec crypto offload, and verified IPv4
      UDP-encapsulated ESP packets on both wifi/cellular network
Signed-off-by: Mike Yu <yumike@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/ipv4/esp4.c
net/ipv4/esp4_offload.c