[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:
Kazunori MIYAZAWA
2008-03-24 14:51:51 -07:00
committed by David S. Miller
parent fa86d322d8
commit df9dcb4588
10 changed files with 113 additions and 21 deletions

View File

@ -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;
}
/*