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
This commit is contained in:
parent
3885812c8c
commit
59f577ad8c
@ -859,6 +859,10 @@ tcp_output(tp)
|
||||
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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user