diff options
| author | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-11-11 15:09:06 -0500 |
|---|---|---|
| committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-11-11 15:09:06 -0500 |
| commit | ca869912366f60cb5e0bdd09f65e80ee6816e73c (patch) | |
| tree | a72913a29495ca078987c09fc0008f47e11b900b /net/ipv6/tcp_ipv6.c | |
| parent | dd8a306ac0c918268bd2ae89da2dea627f6e352d (diff) | |
| parent | 388f7ef720a982f49925e7b4e96f216f208f8c03 (diff) | |
Merge with /home/shaggy/git/linus-clean/
Diffstat (limited to 'net/ipv6/tcp_ipv6.c')
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index d746d3b27efb..62c0e5bd931c 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
| @@ -1401,20 +1401,18 @@ out: | |||
| 1401 | static int tcp_v6_checksum_init(struct sk_buff *skb) | 1401 | static int tcp_v6_checksum_init(struct sk_buff *skb) |
| 1402 | { | 1402 | { |
| 1403 | if (skb->ip_summed == CHECKSUM_HW) { | 1403 | if (skb->ip_summed == CHECKSUM_HW) { |
| 1404 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
| 1405 | if (!tcp_v6_check(skb->h.th,skb->len,&skb->nh.ipv6h->saddr, | 1404 | if (!tcp_v6_check(skb->h.th,skb->len,&skb->nh.ipv6h->saddr, |
| 1406 | &skb->nh.ipv6h->daddr,skb->csum)) | 1405 | &skb->nh.ipv6h->daddr,skb->csum)) { |
| 1406 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
| 1407 | return 0; | 1407 | return 0; |
| 1408 | LIMIT_NETDEBUG(KERN_DEBUG "hw tcp v6 csum failed\n"); | 1408 | } |
| 1409 | } | 1409 | } |
| 1410 | |||
| 1411 | skb->csum = ~tcp_v6_check(skb->h.th,skb->len,&skb->nh.ipv6h->saddr, | ||
| 1412 | &skb->nh.ipv6h->daddr, 0); | ||
| 1413 | |||
| 1410 | if (skb->len <= 76) { | 1414 | if (skb->len <= 76) { |
| 1411 | if (tcp_v6_check(skb->h.th,skb->len,&skb->nh.ipv6h->saddr, | 1415 | return __skb_checksum_complete(skb); |
| 1412 | &skb->nh.ipv6h->daddr,skb_checksum(skb, 0, skb->len, 0))) | ||
| 1413 | return -1; | ||
| 1414 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
| 1415 | } else { | ||
| 1416 | skb->csum = ~tcp_v6_check(skb->h.th,skb->len,&skb->nh.ipv6h->saddr, | ||
| 1417 | &skb->nh.ipv6h->daddr,0); | ||
| 1418 | } | 1416 | } |
| 1419 | return 0; | 1417 | return 0; |
| 1420 | } | 1418 | } |
| @@ -1575,7 +1573,7 @@ static int tcp_v6_rcv(struct sk_buff **pskb, unsigned int *nhoffp) | |||
| 1575 | goto discard_it; | 1573 | goto discard_it; |
| 1576 | 1574 | ||
| 1577 | if ((skb->ip_summed != CHECKSUM_UNNECESSARY && | 1575 | if ((skb->ip_summed != CHECKSUM_UNNECESSARY && |
| 1578 | tcp_v6_checksum_init(skb) < 0)) | 1576 | tcp_v6_checksum_init(skb))) |
| 1579 | goto bad_packet; | 1577 | goto bad_packet; |
| 1580 | 1578 | ||
| 1581 | th = skb->h.th; | 1579 | th = skb->h.th; |
