Skip to content

Commit c276a70

Browse files
herbertxklassert
authored andcommitted
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: 1399637 ("[IPSEC]: Rename mode to outer_mode and add inner_mode") Reported-by: David George <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent 8222d59 commit c276a70

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

net/xfrm/xfrm_state.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2815,11 +2815,6 @@ int __xfrm_init_state(struct xfrm_state *x, bool init_replay, bool offload,
28152815
goto error;
28162816
}
28172817

2818-
if (!(inner_mode->flags & XFRM_MODE_FLAG_TUNNEL)) {
2819-
NL_SET_ERR_MSG(extack, "Only tunnel modes can accommodate an AF_UNSPEC selector");
2820-
goto error;
2821-
}
2822-
28232818
x->inner_mode = *inner_mode;
28242819

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

0 commit comments

Comments
 (0)