Fixed bug #21181: On active open, the initial congestion window was calculated based on the configured TCP_MSS, not on the MSS option received with SYN+ACK.

This commit is contained in:
goldsimon 2007-11-01 15:51:43 +00:00
parent 7a99d73092
commit 853765954e
2 changed files with 10 additions and 3 deletions

View File

@ -435,6 +435,11 @@ HISTORY
++ Bug fixes:
2007-10-09 Simon Goldschmidt
* tcp_in.c: Fixed bug #21181: On active open, the initial congestion window was
calculated based on the configured TCP_MSS, not on the MSS option received
with SYN+ACK.
2007-10-09 Simon Goldschmidt
* udp.c, inet.c, inet.h: Fixed UDPLite: send: Checksum was always generated too
short and also was generated wrong if checksum coverage != tot_len;

View File

@ -517,6 +517,11 @@ tcp_process(struct tcp_pcb *pcb)
pcb->snd_wnd = tcphdr->wnd;
pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
pcb->state = ESTABLISHED;
/* Parse any options in the SYNACK before using pcb->mss since that
* can be changed by the received options! */
tcp_parseopt(pcb);
pcb->cwnd = ((pcb->cwnd == 1) ? (pcb->mss * 2) : pcb->mss);
LWIP_ASSERT("pcb->snd_queuelen > 0", (pcb->snd_queuelen > 0));
--pcb->snd_queuelen;
@ -533,9 +538,6 @@ tcp_process(struct tcp_pcb *pcb)
tcp_seg_free(rseg);
/* Parse any options in the SYNACK. */
tcp_parseopt(pcb);
/* Call the user specified function to call when sucessfully
* connected. */
TCP_EVENT_CONNECTED(pcb, ERR_OK, err);