Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9900d1d authored by Herbert Xu's avatar Herbert Xu Committed by Greg Kroah-Hartman
Browse files

xfrm: Allow transport-mode states with AF_UNSPEC selector



[ Upstream commit c276a706ea1f51cf9723ed8484feceaf961b8f89 ]

xfrm state selectors are matched against the inner-most flow
which can be of any address family.  Therefore middle states
in nested configurations need to carry a wildcard selector in
order to work at all.

However, this is currently forbidden for transport-mode states.

Fix this by removing the unnecessary check.

Fixes: 13996378 ("[IPSEC]: Rename mode to outer_mode and add inner_mode")
Reported-by: default avatarDavid George <David.George@sophos.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 4008fb9a
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2511,9 +2511,6 @@ int __xfrm_init_state(struct xfrm_state *x, bool init_replay, bool offload)
		if (inner_mode == NULL)
			goto error;

		if (!(inner_mode->flags & XFRM_MODE_FLAG_TUNNEL))
			goto error;

		x->inner_mode = *inner_mode;

		if (x->props.family == AF_INET)