diff options
author | Diego Beltrami <diego.beltrami@gmail.com> | 2006-10-03 23:47:05 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-10-04 00:31:09 -0700 |
commit | 0a69452cb45add0841c2bc1e75c25f6bd4f1d8d9 (patch) | |
tree | 17906377f0f55c809126932e3a0e4b9bb972739c /net/ipv4/ipcomp.c | |
parent | 80246ab36ec8baf7d107254adb166baa555a59f8 (diff) | |
download | op-kernel-dev-0a69452cb45add0841c2bc1e75c25f6bd4f1d8d9.zip op-kernel-dev-0a69452cb45add0841c2bc1e75c25f6bd4f1d8d9.tar.gz |
[XFRM]: BEET mode
This patch introduces the BEET mode (Bound End-to-End Tunnel) with as
specified by the ietf draft at the following link:
http://www.ietf.org/internet-drafts/draft-nikander-esp-beet-mode-06.txt
The patch provides only single family support (i.e. inner family =
outer family).
Signed-off-by: Diego Beltrami <diego.beltrami@gmail.com>
Signed-off-by: Miika Komu <miika@iki.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Abhinav Pathak <abhinav.pathak@hiit.fi>
Signed-off-by: Jeff Ahrenholz <ahrenholz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipcomp.c')
-rw-r--r-- | net/ipv4/ipcomp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index 2017d36..3839b70 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c @@ -206,6 +206,7 @@ static void ipcomp4_err(struct sk_buff *skb, u32 info) static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x) { struct xfrm_state *t; + u8 mode = XFRM_MODE_TUNNEL; t = xfrm_state_alloc(); if (t == NULL) @@ -216,7 +217,9 @@ static struct xfrm_state *ipcomp_tunnel_create(struct xfrm_state *x) t->id.daddr.a4 = x->id.daddr.a4; memcpy(&t->sel, &x->sel, sizeof(t->sel)); t->props.family = AF_INET; - t->props.mode = XFRM_MODE_TUNNEL; + if (x->props.mode == XFRM_MODE_BEET) + mode = x->props.mode; + t->props.mode = mode; t->props.saddr.a4 = x->props.saddr.a4; t->props.flags = x->props.flags; |