]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[IPSEC]: Fix BEET output
authorHerbert Xu <herbert@gondor.apana.org.au>
Wed, 26 Mar 2008 23:51:09 +0000 (16:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Mar 2008 23:51:09 +0000 (16:51 -0700)
commit732c8bd590625e8bc0b88313b82930e336b2bec4
tree1cf3f6b9db7b886d35bbf38bab2ca6ff82d206d8
parent0e5606e4f46b7cf52dd445af01e71ed9dbb7f735
[IPSEC]: Fix BEET output

The IPv6 BEET output function is incorrectly including the inner
header in the payload to be protected.  This causes a crash as
the packet doesn't actually have that many bytes for a second
header.

The IPv4 BEET output on the other hand is broken when it comes
to handling an inner IPv6 header since it always assumes an
inner IPv4 header.

This patch fixes both by making sure that neither BEET output
function touches the inner header at all.  All access is now
done through the protocol-independent cb structure.  Two new
attributes are added to make this work, the IP header length
and the IPv4 option length.  They're filled in by the inner
mode's output function.

Thanks to Joakim Koskela for finding this problem.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/xfrm.h
net/ipv4/xfrm4_mode_beet.c
net/ipv4/xfrm4_state.c
net/ipv6/xfrm6_mode_beet.c
net/ipv6/xfrm6_state.c