mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 14:11:02 +00:00
Fixed bug #51528 (Bug when parsing WND_SCALE option)
Signed-off-by: goldsimon <goldsimon@gmx.de>
(cherry picked from commit 2e78b6dcae
)
This commit is contained in:
parent
32aa50cfbc
commit
ac880ea907
@ -1749,11 +1749,11 @@ tcp_parseopt(struct tcp_pcb *pcb)
|
||||
LWIP_DEBUGF(TCP_INPUT_DEBUG, ("tcp_parseopt: bad length\n"));
|
||||
return;
|
||||
}
|
||||
/* An WND_SCALE option with the right option length. */
|
||||
data = tcp_getoptbyte();
|
||||
/* If syn was received with wnd scale option,
|
||||
activate wnd scale opt, but only if this is not a retransmission */
|
||||
if ((flags & TCP_SYN) && !(pcb->flags & TF_WND_SCALE)) {
|
||||
/* An WND_SCALE option with the right option length. */
|
||||
data = tcp_getoptbyte();
|
||||
pcb->snd_scale = data;
|
||||
if (pcb->snd_scale > 14U) {
|
||||
pcb->snd_scale = 14U;
|
||||
|
Loading…
Reference in New Issue
Block a user