Skip to content

Commit be2b6e6

Browse files
committed
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 <[email protected]>
1 parent 00c5a98 commit be2b6e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/core/skbuff.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,8 @@ struct sk_buff *skb_copy_expand(const struct sk_buff *skb,
932932
copy_skb_header(n, skb);
933933

934934
off = newheadroom - oldheadroom;
935-
n->csum_start += off;
935+
if (n->ip_summed == CHECKSUM_PARTIAL)
936+
n->csum_start += off;
936937
#ifdef NET_SKBUFF_DATA_USES_OFFSET
937938
n->transport_header += off;
938939
n->network_header += off;

0 commit comments

Comments
 (0)