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:
kieranm
2007-07-13 12:24:32 +00:00
parent 5d872b26a1
commit 4ac0580aa0
2 changed files with 17 additions and 0 deletions

View File

@@ -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