summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_output.c
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2000-06-02 17:38:45 +0000
committerjlemon <jlemon@FreeBSD.org>2000-06-02 17:38:45 +0000
commitc7145aec0f4b5f1c97b4caab6dac9e999a2be087 (patch)
treec8114b5ceb82e6b891cd18ba2b710d7c6b65e2fb /sys/netinet/tcp_output.c
parent9ad4da2e704de18c0d98495a5cdb9f62cb2e51ad (diff)
downloadFreeBSD-src-c7145aec0f4b5f1c97b4caab6dac9e999a2be087.zip
FreeBSD-src-c7145aec0f4b5f1c97b4caab6dac9e999a2be087.tar.gz
When attempting to transmit a packet, if the system fails to allocate
a mbuf, it may return without setting any timers. If no more data is scheduled to be transmitted (this was a FIN) the system will sit in LAST_ACK state forever. Thus, when mbuf allocation fails, set the retransmit timer if neither the retransmit or persist timer is already pending. Problem discovered by: Mike Silbersack (silby@silby.com) Pushed for a fix by: Bosko Milekic <bmilekic@dsuper.net> Reviewed by: jayanth
Diffstat (limited to 'sys/netinet/tcp_output.c')
-rw-r--r--sys/netinet/tcp_output.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c
index 4a5ac6e..eb49848 100644
--- a/sys/netinet/tcp_output.c
+++ b/sys/netinet/tcp_output.c
@@ -859,6 +859,10 @@ send:
if (error) {
out:
if (error == ENOBUFS) {
+ if (!callout_active(tp->tt_rexmt) &&
+ !callout_active(tp->tt_persist))
+ callout_reset(tp->tt_rexmt, tp->t_rxtcur,
+ tcp_timer_rexmt, tp);
tcp_quench(tp->t_inpcb, 0);
return (0);
}
OpenPOWER on IntegriCloud