mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-12-10 08:46:40 +08:00
prevent rcv_wnd wrapping in tcp_recved.patch #2201
This commit is contained in:
parent
2b6f48cc09
commit
1d61ebaa36
@ -442,9 +442,10 @@ tcp_listen(struct tcp_pcb *pcb)
|
||||
void
|
||||
tcp_recved(struct tcp_pcb *pcb, u16_t len)
|
||||
{
|
||||
pcb->rcv_wnd += len;
|
||||
if (pcb->rcv_wnd > TCP_WND) {
|
||||
if ((u32_t)pcb->rcv_wnd + len > TCP_WND) {
|
||||
pcb->rcv_wnd = TCP_WND;
|
||||
} else {
|
||||
pcb->rcv_wnd += len;
|
||||
}
|
||||
if (!(pcb->flags & TF_ACK_DELAY) &&
|
||||
!(pcb->flags & TF_ACK_NOW)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user