mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
Ensure ssthresh >= 2*MSS
This commit is contained in:
parent
21e3cde95c
commit
95445fc328
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user