From 4.4BSD-Lite2:

- If we fail to allocate mbufs for the outgoing segment, free the header
  and abort.

From Stevens:
- Ensure the persist timer is running if the send window reaches zero.
  Part of the fix for kern/2335 (pete@daemon.net).
This commit is contained in:
thorpej 1997-12-17 05:59:32 +00:00
parent 60b43a9445
commit 82ce1f6a97

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcp_output.c,v 1.24 1997/12/11 22:47:24 thorpej Exp $ */
/* $NetBSD: tcp_output.c,v 1.25 1997/12/17 05:59:32 thorpej Exp $ */
/*
* Copyright (c) 1982, 1986, 1988, 1990, 1993
@ -193,15 +193,18 @@ again:
* but we haven't been called to retransmit,
* len will be -1. Otherwise, window shrank
* after we sent into it. If window shrank to 0,
* cancel pending retransmit and pull snd_nxt
* back to (closed) window. We will enter persist
* state below. If the window didn't close completely,
* just wait for an ACK.
* cancel pending retransmit, pull snd_nxt back
* to (closed) window, and set the persist timer
* if it isn't already going. If the window didn't
* close completely, just wait for an ACK.
*/
len = 0;
if (win == 0) {
tp->t_timer[TCPT_REXMT] = 0;
tp->t_rxtshift = 0;
tp->snd_nxt = tp->snd_una;
if (tp->t_timer[TCPT_PERSIST] == 0)
tcp_setpersist(tp);
}
}
if (len > txsegsize) {
@ -419,8 +422,11 @@ send:
m->m_len += len;
} else {
m->m_next = m_copy(so->so_snd.sb_mb, off, (int) len);
if (m->m_next == 0)
len = 0;
if (m->m_next == 0) {
(void) m_freem(m);
error = ENOBUFS;
goto out;
}
}
#endif
/*