diff options
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c54f3664bce5..8a476f1956e5 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -1397,7 +1397,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to) | |||
1397 | unsigned int csum; | 1397 | unsigned int csum; |
1398 | long csstart; | 1398 | long csstart; |
1399 | 1399 | ||
1400 | if (skb->ip_summed == CHECKSUM_HW) | 1400 | if (skb->ip_summed == CHECKSUM_PARTIAL) |
1401 | csstart = skb->h.raw - skb->data; | 1401 | csstart = skb->h.raw - skb->data; |
1402 | else | 1402 | else |
1403 | csstart = skb_headlen(skb); | 1403 | csstart = skb_headlen(skb); |
@@ -1411,7 +1411,7 @@ void skb_copy_and_csum_dev(const struct sk_buff *skb, u8 *to) | |||
1411 | csum = skb_copy_and_csum_bits(skb, csstart, to + csstart, | 1411 | csum = skb_copy_and_csum_bits(skb, csstart, to + csstart, |
1412 | skb->len - csstart, 0); | 1412 | skb->len - csstart, 0); |
1413 | 1413 | ||
1414 | if (skb->ip_summed == CHECKSUM_HW) { | 1414 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
1415 | long csstuff = csstart + skb->csum; | 1415 | long csstuff = csstart + skb->csum; |
1416 | 1416 | ||
1417 | *((unsigned short *)(to + csstuff)) = csum_fold(csum); | 1417 | *((unsigned short *)(to + csstuff)) = csum_fold(csum); |
@@ -1898,10 +1898,10 @@ int skb_append_datato_frags(struct sock *sk, struct sk_buff *skb, | |||
1898 | * @len: length of data pulled | 1898 | * @len: length of data pulled |
1899 | * | 1899 | * |
1900 | * This function performs an skb_pull on the packet and updates | 1900 | * This function performs an skb_pull on the packet and updates |
1901 | * update the CHECKSUM_HW checksum. It should be used on receive | 1901 | * update the CHECKSUM_COMPLETE checksum. It should be used on |
1902 | * path processing instead of skb_pull unless you know that the | 1902 | * receive path processing instead of skb_pull unless you know |
1903 | * checksum difference is zero (e.g., a valid IP header) or you | 1903 | * that the checksum difference is zero (e.g., a valid IP header) |
1904 | * are setting ip_summed to CHECKSUM_NONE. | 1904 | * or you are setting ip_summed to CHECKSUM_NONE. |
1905 | */ | 1905 | */ |
1906 | unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len) | 1906 | unsigned char *skb_pull_rcsum(struct sk_buff *skb, unsigned int len) |
1907 | { | 1907 | { |
@@ -1994,7 +1994,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) | |||
1994 | frag = skb_shinfo(nskb)->frags; | 1994 | frag = skb_shinfo(nskb)->frags; |
1995 | k = 0; | 1995 | k = 0; |
1996 | 1996 | ||
1997 | nskb->ip_summed = CHECKSUM_HW; | 1997 | nskb->ip_summed = CHECKSUM_PARTIAL; |
1998 | nskb->csum = skb->csum; | 1998 | nskb->csum = skb->csum; |
1999 | memcpy(skb_put(nskb, hsize), skb->data + offset, hsize); | 1999 | memcpy(skb_put(nskb, hsize), skb->data + offset, hsize); |
2000 | 2000 | ||