[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>

authored by Patrick McHardy and committed by David S. Miller bcf0dda8 21f644f3

+1 -1
+1 -1
net/xfrm/xfrm_user.c
··· 288 288 memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); 289 289 x->props.flags = p->flags; 290 290 291 - if (x->props.mode == XFRM_MODE_TRANSPORT) 291 + if (!x->sel.family) 292 292 x->sel.family = p->family; 293 293 294 294 }