aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index f7f7e5687e46..30fcc7f9d4ed 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1175,12 +1175,12 @@ int skb_checksum_help(struct sk_buff *skb)
1175 BUG_ON(offset > (int)skb->len); 1175 BUG_ON(offset > (int)skb->len);
1176 csum = skb_checksum(skb, offset, skb->len-offset, 0); 1176 csum = skb_checksum(skb, offset, skb->len-offset, 0);
1177 1177
1178 offset = skb->tail - skb->h.raw; 1178 offset = skb->tail - skb_transport_header(skb);
1179 BUG_ON(offset <= 0); 1179 BUG_ON(offset <= 0);
1180 BUG_ON(skb->csum_offset + 2 > offset); 1180 BUG_ON(skb->csum_offset + 2 > offset);
1181 1181
1182 *(__sum16*)(skb->h.raw + skb->csum_offset) = csum_fold(csum); 1182 *(__sum16 *)(skb_transport_header(skb) +
1183 1183 skb->csum_offset) = csum_fold(csum);
1184out_set_summed: 1184out_set_summed:
1185 skb->ip_summed = CHECKSUM_NONE; 1185 skb->ip_summed = CHECKSUM_NONE;
1186out: 1186out: