summaryrefslogtreecommitdiffstats
path: root/net/ipv6/raw.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/raw.c
parent2bda2853150e20ca2a44627d00b5f85af0b24a42 (diff)
downloadop-kernel-dev-868c86bcb5bdea7ed8d45979b17bb919af9254db.zip
op-kernel-dev-868c86bcb5bdea7ed8d45979b17bb919af9254db.tar.gz
[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.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index b03040a..cee5db2 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)
skb->ip_summed = CHECKSUM_UNNECESSARY;
}
if (skb->ip_summed != CHECKSUM_UNNECESSARY)
- skb->csum = ~csum_ipv6_magic(&skb->nh.ipv6h->saddr,
+ skb->csum = ~csum_unfold(csum_ipv6_magic(&skb->nh.ipv6h->saddr,
&skb->nh.ipv6h->daddr,
- skb->len, inet->num, 0);
+ skb->len, inet->num, 0));
if (inet->hdrincl) {
if (skb_checksum_complete(skb)) {
@@ -479,8 +479,8 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
int offset;
int len;
int total_len;
- u32 tmp_csum;
- u16 csum;
+ __wsum tmp_csum;
+ __sum16 csum;
if (!rp->checksum)
goto send;
@@ -532,14 +532,13 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
if (unlikely(csum))
tmp_csum = csum_sub(tmp_csum, csum);
- tmp_csum = csum_ipv6_magic(&fl->fl6_src,
+ csum = csum_ipv6_magic(&fl->fl6_src,
&fl->fl6_dst,
total_len, fl->proto, tmp_csum);
if (tmp_csum == 0 && fl->proto == IPPROTO_UDP)
tmp_csum = -1;
- csum = tmp_csum;
if (skb_store_bits(skb, offset, &csum, 2))
BUG();
OpenPOWER on IntegriCloud