summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_timer.c
diff options
context:
space:
mode:
authorprovos <provos@openbsd.org>2000-12-12 08:12:04 +0000
committerprovos <provos@openbsd.org>2000-12-12 08:12:04 +0000
commitf85d60f477a4e35e8a375c15c58db709c7730625 (patch)
tree964ad267cec9b11816cae0010ab4bd9844be786f /sys/netinet/tcp_timer.c
parentrsh was changed to ssh. reflect this in error messages. ok deraadt@ (diff)
downloadwireguard-openbsd-f85d60f477a4e35e8a375c15c58db709c7730625.tar.xz
wireguard-openbsd-f85d60f477a4e35e8a375c15c58db709c7730625.zip
only disable path mtu for established connections that have data to send.
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r--sys/netinet/tcp_timer.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c
index c1e08b91f27..9efd80756ca 100644
--- a/sys/netinet/tcp_timer.c
+++ b/sys/netinet/tcp_timer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_timer.c,v 1.18 2000/12/11 19:12:22 provos Exp $ */
+/* $OpenBSD: tcp_timer.c,v 1.19 2000/12/12 08:12:04 provos Exp $ */
/* $NetBSD: tcp_timer.c,v 1.14 1996/02/13 23:44:09 christos Exp $ */
/*
@@ -247,11 +247,15 @@ tcp_timers(tp, timer)
* value here...
*/
if (ip_mtudisc && tp->t_inpcb &&
+ TCPS_HAVEESTABLISHED(tp->t_state) &&
tp->t_rxtshift > TCP_MAXRXTSHIFT / 6) {
struct inpcb *inp = tp->t_inpcb;
struct rtentry *rt = NULL;
struct sockaddr_in sin;
+ /* No data to send means path mtu is not a problem */
+ if (!inp->inp_socket->so_snd.sb_cc)
+ goto out;
rt = in_pcbrtentry(inp);
/* Check if path MTU discovery is disabled already */