aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index b8b106358040..a90bc439488e 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -473,8 +473,8 @@ struct sk_buff *skb_clone(struct sk_buff *skb, gfp_t gfp_mask)
473#endif 473#endif
474 C(protocol); 474 C(protocol);
475 n->destructor = NULL; 475 n->destructor = NULL;
476 C(mark);
476#ifdef CONFIG_NETFILTER 477#ifdef CONFIG_NETFILTER
477 C(nfmark);
478 C(nfct); 478 C(nfct);
479 nf_conntrack_get(skb->nfct); 479 nf_conntrack_get(skb->nfct);
480 C(nfctinfo); 480 C(nfctinfo);
@@ -534,8 +534,8 @@ static void copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
534 new->pkt_type = old->pkt_type; 534 new->pkt_type = old->pkt_type;
535 new->tstamp = old->tstamp; 535 new->tstamp = old->tstamp;
536 new->destructor = NULL; 536 new->destructor = NULL;
537 new->mark = old->mark;
537#ifdef CONFIG_NETFILTER 538#ifdef CONFIG_NETFILTER
538 new->nfmark = old->nfmark;
539 new->nfct = old->nfct; 539 new->nfct = old->nfct;
540 nf_conntrack_get(old->nfct); 540 nf_conntrack_get(old->nfct);
541 new->nfctinfo = old->nfctinfo; 541 new->nfctinfo = old->nfctinfo;
@@ -1240,8 +1240,8 @@ EXPORT_SYMBOL(skb_store_bits);
1240 1240
1241/* Checksum skb data. */ 1241/* Checksum skb data. */
1242 1242
1243unsigned int skb_checksum(const struct sk_buff *skb, int offset, 1243__wsum skb_checksum(const struct sk_buff *skb, int offset,
1244 int len, unsigned int csum) 1244 int len, __wsum csum)
1245{ 1245{
1246 int start = skb_headlen(skb); 1246 int start = skb_headlen(skb);
1247 int i, copy = start - offset; 1247 int i, copy = start - offset;
@@ -1265,7 +1265,7 @@ unsigned int skb_checksum(const struct sk_buff *skb, int offset,
1265 1265
1266 end = start + skb_shinfo(skb)->frags[i].size; 1266 end = start + skb_shinfo(skb)->frags[i].size;
1267 if ((copy = end - offset) > 0) { 1267 if ((copy = end - offset) > 0) {
1268 unsigned int csum2; 1268 __wsum csum2;
1269 u8 *vaddr; 1269 u8 *vaddr;
1270 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 1270 skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
1271 1271
@@ -1294,7 +1294,7 @@ unsigned int skb_checksum(const struct sk_buff *skb, int offset,
1294 1294
1295 end = start + list->len; 1295 end = start + list->len;
1296 if ((copy = end - offset) > 0) { 1296 if ((copy = end - offset) > 0) {
1297 unsigned int csum2; 1297 __wsum csum2;
1298 if (copy > len) 1298 if (copy > len)
1299 copy = len; 1299 copy = len;
1300 csum2 = skb_checksum(list, offset - start, 1300 csum2 = skb_checksum(list, offset - start,
@@ -1315,8 +1315,8 @@ unsigned int skb_checksum(const struct sk_buff *skb, int offset,
1315 1315
1316/* Both of above in one bottle. */ 1316/* Both of above in one bottle. */
1317 1317
1318unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, int offset, 1318__wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
1319 u8 *to, int len, unsigned int csum) 1319 u8 *to, int len, __wsum csum)
1320{ 1320{
1321 int start = skb_headlen(skb); 1321 int start = skb_headlen(skb);
1322 int i, copy = start - offset; 1322 int i, copy = start - offset;
@@ -1342,7 +1342,7 @@ unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
1342 1342
1343 end = start + skb_shinfo(skb)->frags[i].size; 1343 end = start + skb_shinfo(skb)->frags[i].size;
1344 if ((copy = end - offset) > 0) { 1344 if ((copy = end - offset) > 0) {
1345 unsigned int csum2; 1345 __wsum csum2;
1346 u8 *vaddr; 1346 u8 *vaddr;
1347 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 1347 skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
1348 1348
@@ -1368,7 +1368,7 @@ unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
1368 struct sk_buff *list = skb_shinfo(skb)->frag_list; 1368 struct sk_buff *list = skb_shinfo(skb)->frag_list;
1369 1369
1370 for (; list; list = list->next) { 1370 for (; list; list = list->next) {
1371 unsigned int csum2; 1371 __wsum csum2;
1372 int end; 1372 int end;
1373 1373
1374 BUG_TRAP(start <= offset + len); 1374 BUG_TRAP(start <= offset + len);
@@ -1396,7 +1396,7 @@ unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
1396 1396
1397void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to) 1397void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to)
1398{ 1398{
1399 unsigned int csum; 1399 __wsum csum;
1400 long csstart; 1400 long csstart;
1401 1401
1402 if (skb->ip_summed == CHECKSUM_PARTIAL) 1402 if (skb->ip_summed == CHECKSUM_PARTIAL)
@@ -1414,9 +1414,9 @@ 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 *((unsigned short *)(to + csstuff)) = csum_fold(csum); 1419 *((__sum16 *)(to + csstuff)) = csum_fold(csum);
1420 } 1420 }
1421} 1421}
1422 1422