summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-07-22 22:27:09 +0200
committerDavid S. Miller <davem@davemloft.net>2010-07-22 22:27:09 +0200
commitbe2b6e62357dd7ee56bdcb05e54002afb4830292 (patch)
tree7a166ad319bad5756a49beb060b91234a3de5510 /net
parentnet: Fix corruption of skb csum field in pskb_expand_head() of net/core/skbuff.c (diff)
downloadlinux-be2b6e62357dd7ee56bdcb05e54002afb4830292.tar.xz
linux-be2b6e62357dd7ee56bdcb05e54002afb4830292.zip
net: Fix skb_copy_expand() handling of ->csum_start
It should only be adjusted if ip_summed == CHECKSUM_PARTIAL. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/skbuff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index c699159b3ede..ce88293a34e2 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -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;