net: Fix skb_copy_expand() handling of ->csum_start
authorDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2010 20:27:09 +0000 (13:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Jul 2010 20:27:09 +0000 (13:27 -0700)
It should only be adjusted if ip_summed == CHECKSUM_PARTIAL.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c

index c699159b3ede4a89c0b50e508a313bde507fdf1b..ce88293a34e263000dd93c0df5690885a857d797 100644 (file)
@@ -932,7 +932,8 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
        copy_skb_header(n, skb);
 
        off                  = newheadroom - oldheadroom;
-       n->csum_start       += off;
+       if (n->ip_summed == CHECKSUM_PARTIAL)
+               n->csum_start += off;
 #ifdef NET_SKBUFF_DATA_USES_OFFSET
        n->transport_header += off;
        n->network_header   += off;