]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfrm: Allow UDP encapsulation only in offload modes
authorLeon Romanovsky <leonro@nvidia.com>
Tue, 12 Mar 2024 11:55:22 +0000 (13:55 +0200)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:20:10 +0000 (18:20 -0400)
commit6312d88f9f67ddd121ad18544a8044a82f053799
treef3ad0799c798c0bca6237ae1266ff4330a058b0b
parent2c02c5059c78a52d170bdee4a369b470de6deb37
xfrm: Allow UDP encapsulation only in offload modes

[ Upstream commit 773bb766ca4a05bf363203030b72b10088869224 ]

The missing check of x->encap caused to the situation where GSO packets
were created with UDP encapsulation.

As a solution return the encap check for non-offloaded SA.

Fixes: 983a73da1f99 ("xfrm: Pass UDP encapsulation in TX packet offload")
Closes: https://lore.kernel.org/all/a650221ae500f0c7cf496c61c96c1b103dcb6f67.camel@redhat.com
Reported-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_device.c