mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Let initialize th_sum before in6_cksum(), again.
Without this fix, all IPv6 TCP RST packet has wrong cksum value, so IPv6 connect() trial to 5.0 machine won't fail until tcp connect timeout, when they should fail soon. Thanks to haro@tk.kubota.co.jp (Munehiro Matsuda) for his much debugging help and detailed info.
This commit is contained in:
parent
3389ae9350
commit
34e3e010b6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=59392
@ -420,6 +420,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
|
||||
nth->th_urp = 0;
|
||||
#ifdef INET6
|
||||
if (isipv6) {
|
||||
nth->th_sum = 0;
|
||||
nth->th_sum = in6_cksum(m, IPPROTO_TCP,
|
||||
sizeof(struct ip6_hdr),
|
||||
tlen - sizeof(struct ip6_hdr));
|
||||
|
@ -420,6 +420,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
|
||||
nth->th_urp = 0;
|
||||
#ifdef INET6
|
||||
if (isipv6) {
|
||||
nth->th_sum = 0;
|
||||
nth->th_sum = in6_cksum(m, IPPROTO_TCP,
|
||||
sizeof(struct ip6_hdr),
|
||||
tlen - sizeof(struct ip6_hdr));
|
||||
|
Loading…
Reference in New Issue
Block a user