mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-08 08:33:39 +08:00
2007-07-13 Kieran Mansley
* src/core/tcp_in.c Apply patch#5741 from Oleg Tyshev to fix bug in
out of sequence processing of received packets
This commit is contained in:
@@ -1113,6 +1113,15 @@ tcp_receive(struct tcp_pcb *pcb)
|
||||
pcb->ooseq = cseg;
|
||||
}
|
||||
}
|
||||
tcp_seg_free(next);
|
||||
if (cseg->next != NULL) {
|
||||
next = cseg->next;
|
||||
if (TCP_SEQ_GT(seqno + cseg.len, next->tcphdr->seqno)) {
|
||||
/* We need to trim the incoming segment. */
|
||||
cseg.len = next->tcphdr->seqno - seqno;
|
||||
pbuf_realloc(cseg.p, cseg.len);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
/* Either the lenghts are the same or the incoming
|
||||
|
||||
Reference in New Issue
Block a user