Skip to content

Commit

Permalink
net: Fix skb_copy_expand() handling of ->csum_start
Browse files Browse the repository at this point in the history
It should only be adjusted if ip_summed == CHECKSUM_PARTIAL.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
davem330 committed Jul 22, 2010
1 parent 00c5a98 commit be2b6e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit be2b6e6

Please sign in to comment.