diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2023-02-21 13:54:00 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-22 13:29:55 +0100 |
| commit | 0da0b816972a88dc82431586cb2c1e85876f9c77 (patch) | |
| tree | 61f46ea80046b09df3265d80460f4bc432fb0606 /net | |
| parent | de26e1b2103b1f56451f6ad77f0190c9066c87dc (diff) | |
| download | linux-0da0b816972a88dc82431586cb2c1e85876f9c77.tar.gz linux-0da0b816972a88dc82431586cb2c1e85876f9c77.tar.bz2 linux-0da0b816972a88dc82431586cb2c1e85876f9c77.zip | |
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: 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/xfrm/xfrm_state.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c index fdbd56ed4bd5..ba73014805a4 100644 --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -2611,9 +2611,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) |
