Ensure ssthresh >= 2*MSS

This commit is contained in:
kieranm 2010-01-28 13:14:42 +00:00
parent 21e3cde95c
commit 95445fc328
2 changed files with 4 additions and 2 deletions

View File

@ -56,6 +56,8 @@ HISTORY
++ Bugfixes:
2010-01-28: Kieran Mansley
* tcp.c: Ensure ssthresh >= 2*MSS
2010-01-27: Simon Goldschmidt
* tcp.h, tcp.c, tcp_in.c: Fixed bug #27871: Calling tcp_abort() in recv

View File

@ -650,8 +650,8 @@ tcp_slowtmr(void)
/* Reduce congestion window and ssthresh. */
eff_wnd = LWIP_MIN(pcb->cwnd, pcb->snd_wnd);
pcb->ssthresh = eff_wnd >> 1;
if (pcb->ssthresh < pcb->mss) {
pcb->ssthresh = pcb->mss * 2;
if (pcb->ssthresh < (pcb->mss << 1)) {
pcb->ssthresh = (pcb->mss << 1);
}
pcb->cwnd = pcb->mss;
LWIP_DEBUGF(TCP_CWND_DEBUG, ("tcp_slowtmr: cwnd %"U16_F