xfrm: Allow transport-mode states with AF_UNSPEC selector
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 21 Feb 2023 05:54:00 +0000 (13:54 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 24 Feb 2023 09:07:24 +0000 (10:07 +0100)
commitc276a706ea1f51cf9723ed8484feceaf961b8f89
treef4a884a9334bf740905f9a7bef2e8c65dcf14569
parent8222d5910dae08213b6d9d4bc9a7f8502855e624
xfrm: Allow transport-mode states with AF_UNSPEC selector

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: 13996378e658 ("[IPSEC]: Rename mode to outer_mode and add inner_mode")
Reported-by: David George <David.George@sophos.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_state.c