]> www.infradead.org Git - users/dwmw2/linux.git/commit
xfrm: fix tunnel mode TX datapath in packet offload mode
authorAlexandre Cassen <acassen@corp.free.fr>
Wed, 19 Feb 2025 10:20:37 +0000 (12:20 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 21 Feb 2025 07:13:12 +0000 (08:13 +0100)
commit5eddd76ec2fd1988f0a3450fde9730b10dd22992
tree19fd88a25f1cac3bbaf78d1ad18fda080bd30b3c
parenta1300691aed9ee852b0a9192e29e2bdc2411a7e6
xfrm: fix tunnel mode TX datapath in packet offload mode

Packets that match the output xfrm policy are delivered to the netstack.
In IPsec packet mode for tunnel mode, the HW is responsible for building
the hard header and outer IP header. In such a situation, the inner
header may refer to a network that is not directly reachable by the host,
resulting in a failed neighbor resolution. The packet is then dropped.
xfrm policy defines the netdevice to use for xmit so we can send packets
directly to it.

Makes direct xmit exclusive to tunnel mode, since some rules may apply
in transport mode.

Fixes: f8a70afafc17 ("xfrm: add TX datapath support for IPsec packet offload mode")
Signed-off-by: Alexandre Cassen <acassen@corp.free.fr>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_output.c