diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-15 00:35:48 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:23:31 -0500 |
commit | 868c86bcb5bdea7ed8d45979b17bb919af9254db (patch) | |
tree | ebc232092d6a8a75261a9e3f698206cc09740fdf /net/ipv6/raw.c | |
parent | 2bda2853150e20ca2a44627d00b5f85af0b24a42 (diff) |
[NET]: annotate csum_ipv6_magic() callers in net/*
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index b03040a20814..cee5db27e8b4 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -370,9 +370,9 @@ int rawv6_rcv(struct sock *sk, struct sk_buff *skb) | |||
370 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 370 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
371 | } | 371 | } |
372 | if (skb->ip_summed != CHECKSUM_UNNECESSARY) | 372 | if (skb->ip_summed != CHECKSUM_UNNECESSARY) |
373 | skb->csum = ~csum_ipv6_magic(&skb->nh.ipv6h->saddr, | 373 | skb->csum = ~csum_unfold(csum_ipv6_magic(&skb->nh.ipv6h->saddr, |
374 | &skb->nh.ipv6h->daddr, | 374 | &skb->nh.ipv6h->daddr, |
375 | skb->len, inet->num, 0); | 375 | skb->len, inet->num, 0)); |
376 | 376 | ||
377 | if (inet->hdrincl) { | 377 | if (inet->hdrincl) { |
378 | if (skb_checksum_complete(skb)) { | 378 | if (skb_checksum_complete(skb)) { |
@@ -479,8 +479,8 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, | |||
479 | int offset; | 479 | int offset; |
480 | int len; | 480 | int len; |
481 | int total_len; | 481 | int total_len; |
482 | u32 tmp_csum; | 482 | __wsum tmp_csum; |
483 | u16 csum; | 483 | __sum16 csum; |
484 | 484 | ||
485 | if (!rp->checksum) | 485 | if (!rp->checksum) |
486 | goto send; | 486 | goto send; |
@@ -532,14 +532,13 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, | |||
532 | if (unlikely(csum)) | 532 | if (unlikely(csum)) |
533 | tmp_csum = csum_sub(tmp_csum, csum); | 533 | tmp_csum = csum_sub(tmp_csum, csum); |
534 | 534 | ||
535 | tmp_csum = csum_ipv6_magic(&fl->fl6_src, | 535 | csum = csum_ipv6_magic(&fl->fl6_src, |
536 | &fl->fl6_dst, | 536 | &fl->fl6_dst, |
537 | total_len, fl->proto, tmp_csum); | 537 | total_len, fl->proto, tmp_csum); |
538 | 538 | ||
539 | if (tmp_csum == 0 && fl->proto == IPPROTO_UDP) | 539 | if (tmp_csum == 0 && fl->proto == IPPROTO_UDP) |
540 | tmp_csum = -1; | 540 | tmp_csum = -1; |
541 | 541 | ||
542 | csum = tmp_csum; | ||
543 | if (skb_store_bits(skb, offset, &csum, 2)) | 542 | if (skb_store_bits(skb, offset, &csum, 2)) |
544 | BUG(); | 543 | BUG(); |
545 | 544 | ||