aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-20 21:07:29 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:27:18 -0500
commitff1dcadb1b55dbf471c5ed109dbbdf06bd19ef3b (patch)
treecbcd17d33ecc52c90d218b43c5aec430be448058 /net/core
parent5b14027bf2132c0631ea9f3be11ced89a5057220 (diff)
[NET]: Split skb->csum
... into anonymous union of __wsum and __u32 (csum and csum_offset resp.) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c4
-rw-r--r--net/core/skbuff.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 1a36b17f4b51..59d058a3b504 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1191,9 +1191,9 @@ int skb_checksum_help(struct sk_buff *skb)
1191 1191
1192 offset = skb->tail - skb->h.raw; 1192 offset = skb->tail - skb->h.raw;
1193 BUG_ON(offset <= 0); 1193 BUG_ON(offset <= 0);
1194 BUG_ON(skb->csum + 2 > offset); 1194 BUG_ON(skb->csum_offset + 2 > offset);
1195 1195
1196 *(__sum16*)(skb->h.raw + skb->csum) = csum_fold(csum); 1196 *(__sum16*)(skb->h.raw + skb->csum_offset) = csum_fold(csum);
1197 1197
1198out_set_summed: 1198out_set_summed:
1199 skb->ip_summed = CHECKSUM_NONE; 1199 skb->ip_summed = CHECKSUM_NONE;
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 07c25d601922..a90bc439488e 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1414,7 +1414,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
1414 skb->len - csstart, 0); 1414 skb->len - csstart, 0);
1415 1415
1416 if (skb->ip_summed == CHECKSUM_PARTIAL) { 1416 if (skb->ip_summed == CHECKSUM_PARTIAL) {
1417 long csstuff = csstart + skb->csum; 1417 long csstuff = csstart + skb->csum_offset;
1418 1418
1419 *((__sum16 *)(to + csstuff)) = csum_fold(csum); 1419 *((__sum16 *)(to + csstuff)) = csum_fold(csum);
1420 } 1420 }