ipsec: enable ipv6 udp checksum offload 52/41152/2
authorJeff Shaw <[email protected]>
Mon, 17 Jun 2024 23:01:20 +0000 (16:01 -0700)
committerFan Zhang <[email protected]>
Tue, 25 Jun 2024 15:37:28 +0000 (15:37 +0000)
commit26574dcd4f8608f6149cb93ff847177801105fcd
tree25d6b0e5eedc096b5e31c544059602a52971f0fb
parent0eccf453c6550bf7c3435dd08c8b504d82e2e2bd
ipsec: enable ipv6 udp checksum offload

RFC6935 section 5 states that, by default, the UDP checksum must be
computed when originating an IPv6 UDP packet. The default behavior
may be overridden when conditions defined by RFC6936 are satisfied.
However this implementation does not satisfy all the conditions so
the checksum must be computed.

After ESP encryption the packet is an IPv6 UDP packet so set the
l3_hdr_offset and l4_hdr_offset values, and set the UDP_CKSUM
offload flag in the buffer.

Type: improvement

Co-authored-by: Cian Ferriter <[email protected]>
Change-Id: I9f8c434c9fe9dbddd8890d5ae366984bfcf34067
Signed-off-by: Jeff Shaw <[email protected]>
src/vnet/ipsec/esp_encrypt.c