diff options
author | David S. Miller <davem@davemloft.net> | 2010-07-22 22:27:09 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-07-22 22:27:09 +0200 |
commit | be2b6e62357dd7ee56bdcb05e54002afb4830292 (patch) | |
tree | 7a166ad319bad5756a49beb060b91234a3de5510 | |
parent | net: Fix corruption of skb csum field in pskb_expand_head() of net/core/skbuff.c (diff) | |
download | linux-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>
-rw-r--r-- | net/core/skbuff.c | 3 |
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; |