[IPSEC]: Rename mode to outer_mode and add inner_mode
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 18 Oct 2007 04:35:51 +0000 (21:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 Oct 2007 04:35:51 +0000 (21:35 -0700)
commit13996378e6585fb25e582afe7489bf52dde78deb
tree4a1eb75c81a5a9d23c68f9818259f3b357dc8265
parentca68145f16359f71cd62b2671aa3e8c58f45ef19
[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>
include/net/xfrm.h
net/core/pktgen.c
net/ipv4/xfrm4_input.c
net/ipv4/xfrm4_output.c
net/ipv4/xfrm4_policy.c
net/ipv6/xfrm6_input.c
net/ipv6/xfrm6_output.c
net/ipv6/xfrm6_policy.c
net/xfrm/xfrm_output.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c