diff options
author | Russell King | 2010-07-31 14:19:22 +0100 |
---|---|---|
committer | Russell King | 2010-07-31 14:19:22 +0100 |
commit | f13b1035ce8bbc27d4ce7c281cddd2718f2cf5b0 (patch) | |
tree | 44419bd03c33e662302dd003f57d36e133144f91 /net/core/skbuff.c | |
parent | e910b63d009701ad4ebbeb089aba35707fa5d68e (diff) | |
parent | 5da3e714e30d40145f4dd37d79de6bbbcb9e6137 (diff) |
Merge branch 'shmobile' into devel
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; |