xfrm: set skb control buffer based on packet offload as well
authorMike Yu <yumike@google.com>
Mon, 4 Mar 2024 12:24:09 +0000 (12:24 +0000)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 5 Mar 2024 09:49:44 +0000 (10:49 +0100)
commit8688ab2170a5be0bc922195f7091c38b506bab2e
tree5b80a75188cf8cf7fcae2967082a878bafccd9c6
parentd4872d70fc6feabfc8e897edad993a81096ade9f
xfrm: set skb control buffer based on packet offload as well

In packet offload, packets are not encrypted in XFRM stack, so
the next network layer which the packets will be forwarded to
should depend on where the packet came from (either xfrm4_output
or xfrm6_output) rather than the matched SA's family type.

Test: verified IPv6-in-IPv4 packets on Android device with
      IPsec packet offload enabled
Signed-off-by: Mike Yu <yumike@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_output.c