On Sat, Feb 24, 2001 at 11:56:18PM +0100, Jesper Skriver wrote:
> jesper@tam% time telnet 195.41.23.1
> Trying 195.41.23.1...
> telnet: connect to address 195.41.23.1: No route to host
> telnet: Unable to connect to remote host
> 0.000u 0.020s 0:00.70 2.8% 88+164k 0+0io 12pf+0w
>
> But that is probably too fast, what if we delay the retransmit by say
> 100ms efter recieving the host unreachable ?
I was thinking of a slightly more generic solution, something like
the patch below. This isn't explicitly tied to ICMP unreachables,
though.
--
Jonathan
Index: tcp_timer.c
===================================================================
RCS file: /ncvs/src/sys/netinet/tcp_timer.c,v
retrieving revision 1.39
diff -u -r1.39 tcp_timer.c
--- tcp_timer.c 2000/10/02 15:00:13 1.39
+++ tcp_timer.c 2001/02/25 05:48:00
@@ -153,6 +153,9 @@
callout_stop(tp->tt_rexmt);
}
+int tcp_syn_backoff[TCP_MAXRXTSHIFT + 1] =
+ { 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 64, 64 };
+
int tcp_backoff[TCP_MAXRXTSHIFT + 1] =
{ 1, 2, 4, 8, 16, 32, 64, 64, 64, 64, 64, 64, 64 };
@@ -393,7 +396,10 @@
tp->t_badrxtwin = ticks + (tp->t_srtt >> (TCP_RTT_SHIFT + 1));
}
tcpstat.tcps_rexmttimeo++;
- rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift];
+ if (tp->t_state == TCPS_SYN_SENT)
+ rexmt = TCP_REXMTVAL(tp) * tcp_syn_backoff[tp->t_rxtshift];
+ else
+ rexmt = TCP_REXMTVAL(tp) * tcp_backoff[tp->t_rxtshift];
TCPT_RANGESET(tp->t_rxtcur, rexmt,
tp->t_rttmin, TCPTV_REXMTMAX);
/*
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message