aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-15 00:35:48 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:23:31 -0500
commit868c86bcb5bdea7ed8d45979b17bb919af9254db (patch)
treeebc232092d6a8a75261a9e3f698206cc09740fdf /net/ipv6/icmp.c
parent2bda2853150e20ca2a44627d00b5f85af0b24a42 (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/icmp.c')
-rw-r--r--net/ipv6/icmp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index bd51847acd57..4ab8acf37b54 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -234,7 +234,7 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct
234 len, fl->proto, 234 len, fl->proto,
235 skb->csum); 235 skb->csum);
236 } else { 236 } else {
237 u32 tmp_csum = 0; 237 __wsum tmp_csum = 0;
238 238
239 skb_queue_walk(&sk->sk_write_queue, skb) { 239 skb_queue_walk(&sk->sk_write_queue, skb) {
240 tmp_csum = csum_add(tmp_csum, skb->csum); 240 tmp_csum = csum_add(tmp_csum, skb->csum);
@@ -242,10 +242,10 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct
242 242
243 tmp_csum = csum_partial((char *)icmp6h, 243 tmp_csum = csum_partial((char *)icmp6h,
244 sizeof(struct icmp6hdr), tmp_csum); 244 sizeof(struct icmp6hdr), tmp_csum);
245 tmp_csum = csum_ipv6_magic(&fl->fl6_src, 245 icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src,
246 &fl->fl6_dst, 246 &fl->fl6_dst,
247 len, fl->proto, tmp_csum); 247 len, fl->proto,
248 icmp6h->icmp6_cksum = tmp_csum; 248 tmp_csum);
249 } 249 }
250 ip6_push_pending_frames(sk); 250 ip6_push_pending_frames(sk);
251out: 251out:
@@ -636,8 +636,8 @@ static int icmpv6_rcv(struct sk_buff **pskb)
636 break; 636 break;
637 /* fall through */ 637 /* fall through */
638 case CHECKSUM_NONE: 638 case CHECKSUM_NONE:
639 skb->csum = ~csum_ipv6_magic(saddr, daddr, skb->len, 639 skb->csum = ~csum_unfold(csum_ipv6_magic(saddr, daddr, skb->len,
640 IPPROTO_ICMPV6, 0); 640 IPPROTO_ICMPV6, 0));
641 if (__skb_checksum_complete(skb)) { 641 if (__skb_checksum_complete(skb)) {
642 LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [" NIP6_FMT " > " NIP6_FMT "]\n", 642 LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [" NIP6_FMT " > " NIP6_FMT "]\n",
643 NIP6(*saddr), NIP6(*daddr)); 643 NIP6(*saddr), NIP6(*daddr));