summaryrefslogtreecommitdiffstats
path: root/net/xfrm
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2008-04-10 00:08:24 +0200
committerDavid S. Miller <davem@davemloft.net>2008-04-10 00:08:24 +0200
commitbcf0dda8d2408fe1c1040cdec5a98e5fcad2ac72 (patch)
tree33117ad780d212f8a83c007ccc1b95bc0debbdbf /net/xfrm
parent[NET]: Undo code bloat in hot paths due to print_mac(). (diff)
downloadlinux-bcf0dda8d2408fe1c1040cdec5a98e5fcad2ac72.tar.xz
linux-bcf0dda8d2408fe1c1040cdec5a98e5fcad2ac72.zip
[XFRM]: xfrm_user: fix selector family initialization
Commit df9dcb45 ([IPSEC]: Fix inter address family IPsec tunnel handling) broke openswan by removing the selector initialization for tunnel mode in case it is uninitialized. This patch restores the initialization, fixing openswan, but probably breaking inter-family tunnels again (unknown since the patch author disappeared). The correct thing for inter-family tunnels is probably to simply initialize the selector family explicitly. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r--net/xfrm/xfrm_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c
index 5d96f2728dc6..019d21de19b3 100644
--- a/net/xfrm/xfrm_user.c
+++ b/net/xfrm/xfrm_user.c
@@ -288,7 +288,7 @@ 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;
- if (x->props.mode == XFRM_MODE_TRANSPORT)
+ if (!x->sel.family)
x->sel.family = p->family;
}