From: Miika Komu Date: Fri, 1 Dec 2006 00:40:43 +0000 (-0800) Subject: [IPSEC]: Add encapsulation family. X-Git-Tag: v2.6.20-rc1~34^2~40^2~75 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76b3f055f38954c67dab13844eb92203580038f8;p=linux-2.6 [IPSEC]: Add encapsulation family. Signed-off-by: Miika Komu Signed-off-by: Diego Beltrami Signed-off-by: Kazunori Miyazawa Signed-off-by: David S. Miller --- diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 984e5c4526..15ec19dcf9 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -310,6 +310,8 @@ struct xfrm_tmpl /* Source address of tunnel. Ignored, if it is not a tunnel. */ xfrm_address_t saddr; + unsigned short encap_family; + __u32 reqid; /* Mode: transport, tunnel etc. */ diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index e5ea1347a4..64d3938f74 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c @@ -1211,6 +1211,7 @@ xfrm_tmpl_resolve_one(struct xfrm_policy *policy, struct flowi *fl, if (tmpl->mode == XFRM_MODE_TUNNEL) { remote = &tmpl->id.daddr; local = &tmpl->saddr; + family = tmpl->encap_family; if (xfrm_addr_any(local, family)) { error = xfrm_get_saddr(&tmp, remote, family); if (error)