]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] Reassembly trim not clearing CHECKSUM_HW
authorStephen Hemminger <shemminger@osdl.org>
Tue, 6 Sep 2005 22:52:34 +0000 (15:52 -0700)
committerChris Wright <chrisw@osdl.org>
Sat, 10 Sep 2005 02:42:52 +0000 (19:42 -0700)
[IPV4]: Reassembly trim not clearing CHECKSUM_HW

This was found by inspection while looking for checksum problems
with the skge driver that sets CHECKSUM_HW. It did not fix the
problem, but it looks like it is needed.

If IP reassembly is trimming an overlapping fragment, it
should reset (or adjust) the hardware checksum flag on the skb.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/ip_fragment.c

index eb377ae15305f7bff94c6c5e7967a68502464146..6ccfc2fdc2f976492911e77cf5d0ba4663b62536 100644 (file)
@@ -457,7 +457,7 @@ static void ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
 
        if (pskb_pull(skb, ihl) == NULL)
                goto err;
-       if (pskb_trim(skb, end-offset))
+       if (pskb_trim_rcsum(skb, end-offset))
                goto err;
 
        /* Find out which fragments are in front and at the back of us