diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2000-12-12 08:12:05 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2000-12-12 08:12:05 +0000 |
commit | 4d2191da25c179cb41f39d1eac7882e3c71b8d6c (patch) | |
tree | e74ac8bf4602e20a04e1f83639628a5aae97d399 /sys/netinet/tcp_timer.c | |
parent | d67f0883f7751e4bea39659d6262f0b6fd039c50 (diff) |
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.c | 6 |
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 */ |