Commit ec1a2191 authored by Hideaki Yoshifuji's avatar Hideaki Yoshifuji

[IPV6] put appropriate checksum for rawv6 sockets even if it was not initialized.

parent b59b3e33
...@@ -481,6 +481,10 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r ...@@ -481,6 +481,10 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct r
} }
} }
/* in case cksum was not initialized */
if (unlikely(*csum))
tmp_csum = csum_sub(tmp_csum, *csum);
*csum = csum_ipv6_magic(&fl->fl6_src, *csum = csum_ipv6_magic(&fl->fl6_src,
&fl->fl6_dst, &fl->fl6_dst,
len, fl->proto, tmp_csum); len, fl->proto, tmp_csum);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment