devip: if the server does not support TCP ws option, disable window scaling (thanks joe9)

if the server responds without a window scale option in
its syn-ack, disable window scaling alltogether as both
sides need to understand the option.
This commit is contained in:
cinap_lenrek 2019-05-22 22:20:31 +02:00
parent d7aa56c073
commit 197ff3ac2f

View file

@ -3031,6 +3031,12 @@ procsyn(Conv *s, Tcp *seg)
tpriv->stats[Mss] = tcb->mss; tpriv->stats[Mss] = tcb->mss;
} }
/* if the server does not support ws option, disable window scaling */
if(seg->ws == 0){
tcb->scale = 0;
tcb->snd.scale = 0;
}
tcb->snd.wnd = seg->wnd; tcb->snd.wnd = seg->wnd;
initialwindow(tcb); initialwindow(tcb);
} }