Message ID | 1386538601.30495.305.camel@edumazet-glaptop2.roam.corp.google.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 2718fed53d8c..d6fcb6272d37 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -913,8 +913,12 @@ EXPORT_SYMBOL(skb_clone); static void skb_headers_offset_update(struct sk_buff *skb, int off) { /* Only adjust this if it actually is csum_start rather than csum */ - if (skb->ip_summed == CHECKSUM_PARTIAL) - skb->csum_start += off; + if (skb->ip_summed == CHECKSUM_PARTIAL) { + u32 val = (u32)skb->csum_start + off; + + WARN_ON_ONCE(val > 0xFFFF); + skb->csum_start = val; + } /* {transport,network,mac}_header and tail are relative to skb->head */ skb->transport_header += off;