fixbug for baidu tcp recv trim wnd assert

This commit is contained in:
xueyunfei
2020-09-08 21:03:23 +08:00
committed by liu zhifu
parent 57ff437af3
commit 327c8a82f3
+5
View File
@@ -1681,6 +1681,11 @@ tcp_receive(struct tcp_pcb *pcb)
}
/* Adjust length of segment to fit in the window. */
next->next->len = (u16_t)(pcb->rcv_nxt + pcb->rcv_wnd - seqno);
#if ESP_LWIP
if (TCPH_FLAGS(next->next->tcphdr) & TCP_SYN) {
next->next->len -= 1;
}
#endif
pbuf_realloc(next->next->p, next->next->len);
tcplen = TCP_TCPLEN(next->next);
#if ESP_LWIP