mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 15:29:16 +00:00
[XFRM]: Restrict authentication algorithm only when inbound transformation protocol is IPsec.
For Mobile IPv6 usage, routing header or destination options header is used and it doesn't require this comparison. It is checked only for IPsec template. Based on MIPL2 kernel patch. Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1d71627d69
commit
f3bd484021
@ -1004,7 +1004,8 @@ xfrm_state_ok(struct xfrm_tmpl *tmpl, struct xfrm_state *x,
|
||||
(x->id.spi == tmpl->id.spi || !tmpl->id.spi) &&
|
||||
(x->props.reqid == tmpl->reqid || !tmpl->reqid) &&
|
||||
x->props.mode == tmpl->mode &&
|
||||
(tmpl->aalgos & (1<<x->props.aalgo)) &&
|
||||
((tmpl->aalgos & (1<<x->props.aalgo)) ||
|
||||
!(xfrm_id_proto_match(tmpl->id.proto, IPSEC_PROTO_ANY))) &&
|
||||
!(x->props.mode != XFRM_MODE_TRANSPORT &&
|
||||
xfrm_state_addr_cmp(tmpl, x, family));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user