mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-06-05 21:04:45 +00:00
tcp_in/ooseq: Fix incorrect segment trim when FIN moved
2.1.3-esp: 9e62afff tcp_in/ooseq: Fix incorrect segment trim when FIN moved
This commit is contained in:
+4
-1
@@ -1544,9 +1544,12 @@ tcp_receive(struct tcp_pcb *pcb)
|
||||
if (next &&
|
||||
TCP_SEQ_GT(seqno + tcplen,
|
||||
next->tcphdr->seqno)) {
|
||||
/* inseg cannot have FIN here (already processed above) */
|
||||
inseg.len = (u16_t)(next->tcphdr->seqno - seqno);
|
||||
#if ESP_LWIP
|
||||
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN || TCPH_FLAGS(inseg.tcphdr) & TCP_FIN) {
|
||||
#else
|
||||
if (TCPH_FLAGS(inseg.tcphdr) & TCP_SYN) {
|
||||
#endif
|
||||
inseg.len -= 1;
|
||||
}
|
||||
pbuf_realloc(inseg.p, inseg.len);
|
||||
|
||||
Reference in New Issue
Block a user