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>
This commit is contained in:
Mike Yu 2024-07-12 10:51:25 +08:00 • committed by Steffen Klassert
commit 447bc4b190
2 changed files with 23 additions and 2 deletions