mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[NET]: Make mangling a checksum (0 -> 0xffff on the wire) explicit.
Signed-off-by: Al Viro <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
b51655b958
commit
f6ab028804
7 changed files with 11 additions and 10 deletions
|
|
@ -536,8 +536,8 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
|
|||
&fl->fl6_dst,
|
||||
total_len, fl->proto, tmp_csum);
|
||||
|
||||
if (tmp_csum == 0 && fl->proto == IPPROTO_UDP)
|
||||
tmp_csum = -1;
|
||||
if (csum == 0 && fl->proto == IPPROTO_UDP)
|
||||
csum = CSUM_MANGLED_0;
|
||||
|
||||
if (skb_store_bits(skb, offset, &csum, 2))
|
||||
BUG();
|
||||
|
|
|
|||
|
|
@ -536,7 +536,7 @@ static int udp_v6_push_pending_frames(struct sock *sk, struct udp_sock *up)
|
|||
uh->check = csum_ipv6_magic(&fl->fl6_src, &fl->fl6_dst,
|
||||
up->len, fl->proto, csum );
|
||||
if (uh->check == 0)
|
||||
uh->check = -1;
|
||||
uh->check = CSUM_MANGLED_0;
|
||||
|
||||
err = ip6_push_pending_frames(sk);
|
||||
out:
|
||||
|
|
|
|||
Loading…
Reference in a new issue