Hello All,
after review my own fix, I find out, that it was wrong:)
There is new one.
Oleg Tychev
Here is patch against version lwip-1.2.0
--
HIMA Paul Hildebrandt GmbH + Co KG, Postfach 12 61, 68777 Bruehl bei Mannheim
Kommanditgesellschaft, Sitz Bruehl, Deutschland - Registergericht Mannheim HRA 10 17 S
Ust-ID: DE 144286400, St.Nr: 43038 00190
Persoenlich haftende Gesellschafterin Paul Hildebrandt Verwaltungsgesellschaft mbH,
Sitz Bruehl, Deutschland - Registergericht Mannheim HRB 05 88 S -
Geschaeftsfuehrer: Dipl.-Betriebswirt Steffen Philipp, Dipl.-Kfm. Peter
Swiczinsky
*** lwip-1.2.0/src/core/tcp_in.c Fri Aug 18 13:18:42 2006
--- lwip-1.2.0/src/core/tcp_in_fix.c Fri Feb 9 10:41:34 2007
***************
*** 1052,1073 ****
--- 1052,1082 ----
/* The incoming segment is larger than the old
segment. We replace the old segment with the new
one. */
cseg = tcp_seg_copy(&inseg);
if (cseg != NULL) {
cseg->next = next->next;
if (prev != NULL) {
prev->next = cseg;
} else {
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
segment was smaller than the old one; in either
case, we ditch the incoming segment. */
break;
}
} else {
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users