diff options
author | 2000-09-18 22:06:36 +0000 | |
---|---|---|
committer | 2000-09-18 22:06:36 +0000 | |
commit | 62c4355e0f896ae5d33dc8e181b593b965dc1a7c (patch) | |
tree | 227ac38b9696134dc2a925911c014f9a9500df85 /sys/netinet/tcp_timer.c | |
parent | fix reversed muting; patch from: jason@ (diff) | |
download | wireguard-openbsd-62c4355e0f896ae5d33dc8e181b593b965dc1a7c.tar.xz wireguard-openbsd-62c4355e0f896ae5d33dc8e181b593b965dc1a7c.zip |
Path MTU discovery based on NetBSD but with the decision to use the DF
flag delayed to ip_output(). That halves the code and reduces most of
the route lookups. okay deraadt@
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r-- | sys/netinet/tcp_timer.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index ccc114118bf..4f7b1726439 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_timer.c,v 1.16 1999/12/21 17:49:28 provos Exp $ */ +/* $OpenBSD: tcp_timer.c,v 1.17 2000/09/18 22:06:38 provos Exp $ */ /* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */ /* @@ -236,6 +236,24 @@ tcp_timers(tp, timer) rto * tcp_backoff[tp->t_rxtshift], tp->t_rttmin, TCPTV_REXMTMAX); tp->t_timer[TCPT_REXMT] = tp->t_rxtcur; +#if 0 + /* + * If we are losing and we are trying path MTU discovery, + * try turning it off. This will avoid black holes in + * the network which suppress or fail to send "packet + * too big" ICMP messages. We should ideally do + * lots more sophisticated searching to find the right + * value here... + */ + if (ip_mtudisc && tp->t_rxtshift > TCP_MAXRXTSHIFT / 6) { + struct rtentry *rt = NULL; + + if (tp->t_inpcb) + rt = in_pcbrtentry(tp->t_inpcb); + + /* XXX: Black hole recovery code goes here */ + } +#endif /* * If losing, let the lower level know and try for * a better route. Also, if we backed off this far, |