happy eyesockets
"Jonathan A. Kollasch" <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.network |
|---|---|
| Message-ID | <[email protected]> |
Attached is a patch to actually treat ICMP(v6) host/net/port unreachables during TCP establishment in a way that doesn't cause ~75 second delays waiting for multiple retransmits to all be reported as unreachable before actually letting getaddrinfo(3) fall back to the next address. Linux seems to handle this like this already. Commitable? Jonathan Kollasch
tcp_subr.c-diff
(text/plain, 729 B)
Index: sys/netinet/tcp_subr.c
===================================================================
RCS file: /cvsroot/src/sys/netinet/tcp_subr.c,v
retrieving revision 1.298
diff -d -u -a -p -r1.298 tcp_subr.c
--- sys/netinet/tcp_subr.c 26 Feb 2025 04:49:45 -0000 1.298
+++ sys/netinet/tcp_subr.c 23 Mar 2025 00:01:00 -0000
@@ -1260,6 +1260,10 @@ tcp_notify(struct inpcb *inp, int error)
error == EHOSTDOWN)) {
return;
} else if (TCPS_HAVEESTABLISHED(tp->t_state) == 0 &&
+ (error == EHOSTUNREACH || error == ENETUNREACH ||
+ error == ECONNREFUSED)) {
+ so->so_error = error;
+ } else if (TCPS_HAVEESTABLISHED(tp->t_state) == 0 &&
tp->t_rxtshift > 3 && tp->t_softerror)
so->so_error = error;
else