]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:38 +0000 (13:33 +0100)
commit0a4b057eb15e3450d6b1ced73932c8689af184f7
treeaa5a306ce8648e1ca28212c44844155bf2fe6ec0
parentb2631ae6ec629bb09281924dd2a267d3590ba713
xfrm: Allow transport-mode states with AF_UNSPEC selector

[ Upstream commit 58e281520cc9fb0c35f819ca7ecbc5bcb25d1609 ]

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: 4701323acddc ("[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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_state.c