]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
netdevsim: rely on XFRM state direction instead of flags
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 5 May 2022 10:06:43 +0000 (13:06 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:50:54 +0000 (19:50 +0100)
[ Upstream commit 55e2f83afb1c142885da63c5a9ce2998b6f6ab21 ]

Make sure that netdevsim relies on direction and not on flags.

Reviewed-by: Raed Salem <raeds@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Stable-dep-of: 2cf567f421db ("netdevsim: copy addresses for both in and out paths")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/netdevsim/ipsec.c

index b80ed2ffd45eb52c30851efe1e4cc67d7130658d..386336a38f349d41692d8564783ec4c5e23f11af 100644 (file)
@@ -171,7 +171,7 @@ static int nsim_ipsec_add_sa(struct xfrm_state *xs)
                return ret;
        }
 
-       if (xs->xso.flags & XFRM_OFFLOAD_INBOUND) {
+       if (xs->xso.dir == XFRM_DEV_OFFLOAD_IN) {
                sa.rx = true;
 
                if (xs->props.family == AF_INET6)