diff options
author | shin <shin@FreeBSD.org> | 2000-04-19 15:05:00 +0000 |
---|---|---|
committer | shin <shin@FreeBSD.org> | 2000-04-19 15:05:00 +0000 |
commit | b90287b571e6cedb62c0a5116187665b8f838574 (patch) | |
tree | 95a6ecade2ad00bb29c518784b22e14b489a2dd0 | |
parent | 6be1308ad17c05993e3e29f246b7f0efa03a05fe (diff) | |
download | FreeBSD-src-b90287b571e6cedb62c0a5116187665b8f838574.zip FreeBSD-src-b90287b571e6cedb62c0a5116187665b8f838574.tar.gz |
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.
-rw-r--r-- | sys/netinet/tcp_subr.c | 1 | ||||
-rw-r--r-- | sys/netinet/tcp_timewait.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index d4c552f..e38a2a7 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -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)); diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index d4c552f..e38a2a7 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -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)); |