diff options
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 14 |
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); |
251 | out: | 251 | out: |
@@ -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)); |