aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-18 00:35:51 -0400
committerDavid S. Miller <davem@davemloft.net>2007-10-18 00:35:51 -0400
commit13996378e6585fb25e582afe7489bf52dde78deb (patch)
tree4a1eb75c81a5a9d23c68f9818259f3b357dc8265 /include/net/xfrm.h
parentca68145f16359f71cd62b2671aa3e8c58f45ef19 (diff)
[IPSEC]: Rename mode to outer_mode and add inner_mode
This patch adds a new field to xfrm states called inner_mode. The existing mode object is renamed to outer_mode. This is the first part of an attempt to fix inter-family transforms. As it is we always use the outer family when determining which mode to use. As a result we may end up shoving IPv4 packets into netfilter6 and vice versa. What we really want is to use the inner family for the first part of outbound processing and the outer family for the second part. For inbound processing we'd use the opposite pairing. I've also added a check to prevent silly combinations such as transport mode with inter-family transforms. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index f0f3318f6550..688f6f5d3285 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -186,7 +186,8 @@ struct xfrm_state
186 /* Reference to data common to all the instances of this 186 /* Reference to data common to all the instances of this
187 * transformer. */ 187 * transformer. */
188 struct xfrm_type *type; 188 struct xfrm_type *type;
189 struct xfrm_mode *mode; 189 struct xfrm_mode *inner_mode;
190 struct xfrm_mode *outer_mode;
190 191
191 /* Security context */ 192 /* Security context */
192 struct xfrm_sec_ctx *security; 193 struct xfrm_sec_ctx *security;