]> git.itanic.dy.fi Git - linux-stable/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)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 18 Mar 2024 10:56:11 +0000 (11:56 +0100)
commit773bb766ca4a05bf363203030b72b10088869224
tree5ac14da356f666a2535d17f29b6b5ff4bdb13f71
parentc3198822c6cb9fb588e446540485669cc81c5d34
xfrm: Allow UDP encapsulation only in offload modes

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>
net/xfrm/xfrm_device.c