X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=net%2Fcore%2Fskbuff.c;h=ce88293a34e263000dd93c0df5690885a857d797;hb=b31fc7af78e17b0203e1cd5a195c590e8adeae0d;hp=34432b4e96bb288931e8b6ebf2d8d78b5c6589c5;hpb=e8d15e6460cb0eea00f2574a80d94496943403ba;p=sfrench%2Fcifs-2.6.git diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 34432b4e96bb..ce88293a34e2 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -843,7 +843,9 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail, skb->network_header += off; if (skb_mac_header_was_set(skb)) skb->mac_header += off; - skb->csum_start += nhead; + /* Only adjust this if it actually is csum_start rather than csum */ + if (skb->ip_summed == CHECKSUM_PARTIAL) + skb->csum_start += nhead; skb->cloned = 0; skb->hdr_len = 0; skb->nohdr = 0; @@ -930,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;