Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d3a1be9c authored by Brian Haley's avatar Brian Haley Committed by David S. Miller
Browse files

[IPv6]: Only modify checksum for UDP



Only change upper-layer checksum from 0 to 0xFFFF for UDP (as RFC 768
states), not for others as RFC 4443 doesn't require it.

Signed-off-by: default avatarBrian Haley <brian.haley@hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f465e489
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -247,8 +247,6 @@ static int icmpv6_push_pending_frames(struct sock *sk, struct flowi *fl, struct
					   len, fl->proto, tmp_csum);
		icmp6h->icmp6_cksum = tmp_csum;
	}
	if (icmp6h->icmp6_cksum == 0)
		icmp6h->icmp6_cksum = -1;
	ip6_push_pending_frames(sk);
out:
	return err;
+1 −1
Original line number Diff line number Diff line
@@ -536,7 +536,7 @@ 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)
	if (tmp_csum == 0 && fl->proto == IPPROTO_UDP)
		tmp_csum = -1;

	csum = tmp_csum;