]> git.baikalelectronics.ru Git - kernel.git/commit
[NET]: Allow forwarding of ip_summed except CHECKSUM_COMPLETE
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 27 Mar 2007 06:22:20 +0000 (23:22 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:28:16 +0000 (22:28 -0700)
commit7e3b2127253a491553374e4f34a9e98385a3c320
tree25ad3898a3a5aa1f439ce715eb4ab6c418d1d0e6
parentdd03bbca10720e8460f89665ba994c815a9c0961
[NET]: Allow forwarding of ip_summed except CHECKSUM_COMPLETE

Right now Xen has a horrible hack that lets it forward packets with
partial checksums.  One of the reasons that CHECKSUM_PARTIAL and
CHECKSUM_COMPLETE were added is so that we can get rid of this hack
(where it creates two extra bits in the skbuff to essentially mirror
ip_summed without being destroyed by the forwarding code).

I had forgotten that I've already gone through all the deivce drivers
last time around to make sure that they're looking at ip_summed ==
CHECKSUM_PARTIAL rather than ip_summed != 0 on transmit.  In any case,
I've now done that again so it should definitely be safe.

Unfortunately nobody has yet added any code to update CHECKSUM_COMPLETE
values on forward so we I'm setting that to CHECKSUM_NONE.  This should
be safe to remove for bridging but I'd like to check that code path
first.

So here is the patch that lets us get rid of the hack by preserving
ip_summed (mostly) on forwarded packets.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/bridge/br_forward.c
net/ipv4/ip_forward.c
net/ipv6/ip6_output.c