mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
Fixed bug with Nagel Congestion Avoidance where a tcp connection would
stall unnecessarily - always send an ACK when a packet len of < mss is received.
This commit is contained in:
parent
ba582a82b0
commit
b164106fa7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1812
@ -491,7 +491,17 @@ findpcb:
|
||||
m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr);
|
||||
sbappend(&so->so_rcv, m);
|
||||
sorwakeup(so);
|
||||
tp->t_flags |= TF_DELACK;
|
||||
/*
|
||||
* If this is a small packet, then ACK now - with Nagel
|
||||
* congestion avoidance sender won't send more until
|
||||
* he gets an ACK.
|
||||
*/
|
||||
if ((unsigned)ti->ti_len < tp->t_maxseg) {
|
||||
tp->t_flags |= TF_ACKNOW;
|
||||
tcp_output(tp);
|
||||
} else {
|
||||
tp->t_flags |= TF_DELACK;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1263,6 +1273,14 @@ dodata: /* XXX */
|
||||
if (so->so_options & SO_DEBUG)
|
||||
tcp_trace(TA_INPUT, ostate, tp, &tcp_saveti, 0);
|
||||
|
||||
/*
|
||||
* If this is a small packet, then ACK now - with Nagel
|
||||
* congestion avoidance sender won't send more until
|
||||
* he gets an ACK.
|
||||
*/
|
||||
if (ti->ti_len && ((unsigned)ti->ti_len < tp->t_maxseg))
|
||||
tp->t_flags |= TF_ACKNOW;
|
||||
|
||||
/*
|
||||
* Return any desired output.
|
||||
*/
|
||||
|
@ -491,7 +491,17 @@ findpcb:
|
||||
m->m_len -= sizeof(struct tcpiphdr)+off-sizeof(struct tcphdr);
|
||||
sbappend(&so->so_rcv, m);
|
||||
sorwakeup(so);
|
||||
tp->t_flags |= TF_DELACK;
|
||||
/*
|
||||
* If this is a small packet, then ACK now - with Nagel
|
||||
* congestion avoidance sender won't send more until
|
||||
* he gets an ACK.
|
||||
*/
|
||||
if ((unsigned)ti->ti_len < tp->t_maxseg) {
|
||||
tp->t_flags |= TF_ACKNOW;
|
||||
tcp_output(tp);
|
||||
} else {
|
||||
tp->t_flags |= TF_DELACK;
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -1263,6 +1273,14 @@ dodata: /* XXX */
|
||||
if (so->so_options & SO_DEBUG)
|
||||
tcp_trace(TA_INPUT, ostate, tp, &tcp_saveti, 0);
|
||||
|
||||
/*
|
||||
* If this is a small packet, then ACK now - with Nagel
|
||||
* congestion avoidance sender won't send more until
|
||||
* he gets an ACK.
|
||||
*/
|
||||
if (ti->ti_len && ((unsigned)ti->ti_len < tp->t_maxseg))
|
||||
tp->t_flags |= TF_ACKNOW;
|
||||
|
||||
/*
|
||||
* Return any desired output.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user