]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:15 +0000 (18:19 -0400)
commit52a85947ac1229b99186dc0d97532f0b2193e885
tree35d22aaf88b88c3cb884cd2fa3752a853f86bb05
parent4f77a8c2137355a8b63b7d44a7452045b7c7a98b
xfrm: set skb control buffer based on packet offload as well

[ Upstream commit 8688ab2170a5be0bc922195f7091c38b506bab2e ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_output.c