patch by Ambroz Bizjak: fixed bug #49717 (window size in received SYN and SYN-ACK assumed scaled)

This commit is contained in:
goldsimon 2016-11-28 10:26:42 +01:00
parent cac3dc8a46
commit 6f1304e03e
2 changed files with 6 additions and 2 deletions

View File

@ -14,6 +14,10 @@ HISTORY
++ Bugfixes:
2016-11-28: Ambroz Bizjak
* tcpi_in.c: fixed bug #49717 (window size in received SYN and SYN-ACK
assumed scaled)
2016-11-25: Simon Goldschmidt
* dhcp.c: fixed bug #49676 (Possible endless loop when parsing dhcp options)

View File

@ -602,7 +602,7 @@ tcp_listen_input(struct tcp_pcb_listen *pcb)
/* Parse any options in the SYN. */
tcp_parseopt(npcb);
npcb->snd_wnd = SND_WND_SCALE(npcb, tcphdr->wnd);
npcb->snd_wnd = tcphdr->wnd;
npcb->snd_wnd_max = npcb->snd_wnd;
npcb->ssthresh = LWIP_TCP_INITIAL_SSTHRESH(npcb);
@ -751,7 +751,7 @@ tcp_process(struct tcp_pcb *pcb)
pcb->rcv_nxt = seqno + 1;
pcb->rcv_ann_right_edge = pcb->rcv_nxt;
pcb->lastack = ackno;
pcb->snd_wnd = SND_WND_SCALE(pcb, tcphdr->wnd);
pcb->snd_wnd = tcphdr->wnd;
pcb->snd_wnd_max = pcb->snd_wnd;
pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */
pcb->state = ESTABLISHED;