summaryrefslogtreecommitdiff
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-14 21:35:48 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-02 21:23:31 -0800
commit868c86bcb5bdea7ed8d45979b17bb919af9254db (patch)
treeebc232092d6a8a75261a9e3f698206cc09740fdf /net/ipv6/icmp.c
parent2bda2853150e20ca2a44627d00b5f85af0b24a42 (diff)
downloadlinux-exynos-868c86bcb5bdea7ed8d45979b17bb919af9254db.tar.gz
linux-exynos-868c86bcb5bdea7ed8d45979b17bb919af9254db.tar.bz2
linux-exynos-868c86bcb5bdea7ed8d45979b17bb919af9254db.zip
[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
len, fl->proto,
skb->csum);
} else {
- u32 tmp_csum = 0;
+ __wsum tmp_csum = 0;
skb_queue_walk(&sk->sk_write_queue, skb) {
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
tmp_csum = csum_partial((char *)icmp6h,
sizeof(struct icmp6hdr), tmp_csum);
- tmp_csum = csum_ipv6_magic(&fl->fl6_src,
- &fl->fl6_dst,
- len, fl->proto, tmp_csum);
- icmp6h->icmp6_cksum = tmp_csum;
+ icmp6h->icmp6_cksum = csum_ipv6_magic(&fl->fl6_src,
+ &fl->fl6_dst,
+ len, fl->proto,
+ tmp_csum);
}
ip6_push_pending_frames(sk);
out:
@@ -636,8 +636,8 @@ static int icmpv6_rcv(struct sk_buff **pskb)
break;
/* fall through */
case CHECKSUM_NONE:
- skb->csum = ~csum_ipv6_magic(saddr, daddr, skb->len,
- IPPROTO_ICMPV6, 0);
+ skb->csum = ~csum_unfold(csum_ipv6_magic(saddr, daddr, skb->len,
+ IPPROTO_ICMPV6, 0));
if (__skb_checksum_complete(skb)) {
LIMIT_NETDEBUG(KERN_DEBUG "ICMPv6 checksum failed [" NIP6_FMT " > " NIP6_FMT "]\n",
NIP6(*saddr), NIP6(*daddr));