diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-03-27 02:22:20 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:28:16 -0400 |
commit | 35fc92a9deee0da6e35fdc3150bb134e58f2fd63 (patch) | |
tree | 25ad3898a3a5aa1f439ce715eb4ab6c418d1d0e6 /net/bridge | |
parent | 2d771cd86d4c3af26f34a7bcdc1b87696824cad9 (diff) |
[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>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_forward.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index 3e45c1a1aa96..ada7f495445c 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c | |||
@@ -71,7 +71,7 @@ static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb) | |||
71 | 71 | ||
72 | indev = skb->dev; | 72 | indev = skb->dev; |
73 | skb->dev = to->dev; | 73 | skb->dev = to->dev; |
74 | skb->ip_summed = CHECKSUM_NONE; | 74 | skb_forward_csum(skb); |
75 | 75 | ||
76 | NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, indev, skb->dev, | 76 | NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, indev, skb->dev, |
77 | br_forward_finish); | 77 | br_forward_finish); |