aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiika Komu <miika@iki.fi>2006-11-30 19:40:43 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:31:48 -0500
commit76b3f055f38954c67dab13844eb92203580038f8 (patch)
tree59655690a408aef422e65660c41a51789ea2294f
parent08dd1a506bbc4528db60dfdfff61423a1608ed3f (diff)
[IPSEC]: Add encapsulation family.
Signed-off-by: Miika Komu <miika@iki.fi> Signed-off-by: Diego Beltrami <Diego.Beltrami@hiit.fi> Signed-off-by: Kazunori Miyazawa <miyazawa@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/xfrm.h2
-rw-r--r--net/xfrm/xfrm_policy.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 984e5c45265c..15ec19dcf9c8 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -310,6 +310,8 @@ struct xfrm_tmpl
310/* Source address of tunnel. Ignored, if it is not a tunnel. */ 310/* Source address of tunnel. Ignored, if it is not a tunnel. */
311 xfrm_address_t saddr; 311 xfrm_address_t saddr;
312 312
313 unsigned short encap_family;
314
313 __u32 reqid; 315 __u32 reqid;
314 316
315/* Mode: transport, tunnel etc. */ 317/* Mode: transport, tunnel etc. */
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index e5ea1347a4ff..64d3938f74c4 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,
1211 if (tmpl->mode == XFRM_MODE_TUNNEL) { 1211 if (tmpl->mode == XFRM_MODE_TUNNEL) {
1212 remote = &tmpl->id.daddr; 1212 remote = &tmpl->id.daddr;
1213 local = &tmpl->saddr; 1213 local = &tmpl->saddr;
1214 family = tmpl->encap_family;
1214 if (xfrm_addr_any(local, family)) { 1215 if (xfrm_addr_any(local, family)) {
1215 error = xfrm_get_saddr(&tmp, remote, family); 1216 error = xfrm_get_saddr(&tmp, remote, family);
1216 if (error) 1217 if (error)