Browse Source

Ensure ssthresh >= 2*MSS

STABLE-2_1_x
kieranm 16 years ago
parent
commit
95445fc328
  1. 2
      CHANGELOG
  2. 4
      src/core/tcp.c

2
CHANGELOG

@ -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

4
src/core/tcp.c

@ -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…
Cancel
Save