[IPSEC]: Fix inter address family IPsec tunnel handling.
Signed-off-by: Kazunori MIYAZAWA <kazunori@miyazawa.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
fa86d322d8
commit
df9dcb4588
@ -288,12 +288,9 @@ static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info *
|
||||
memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr));
|
||||
x->props.flags = p->flags;
|
||||
|
||||
/*
|
||||
* Set inner address family if the KM left it as zero.
|
||||
* See comment in validate_tmpl.
|
||||
*/
|
||||
if (!x->sel.family)
|
||||
if (x->props.mode == XFRM_MODE_TRANSPORT)
|
||||
x->sel.family = p->family;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user