[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Issue in handling out of sequence segments?

From: Kieran Mansley
Subject: Re: [lwip-users] Issue in handling out of sequence segments?
Date: Tue, 11 Aug 2009 14:02:26 +0100

On Tue, 2009-08-11 at 14:37 +0200, Kesten, Joerg wrote:
> Hi all,
> I think there is an issue in tcp_receive when there is out of sequence
> data pending.

> The two data segments in question are the last ones send on this
> connection (ftp sever closing the connection after an idle timeout), I
> am using lwip 1.3.0 (slightly modified, but I did not mess around in
> the core functions)
> If I modify the code by just adding a "-1" to line 1064:
> inseg.len = (u16_t)(pcb->ooseq->tcphdr->seqno - seqno) -1;
> everything seems to work ok, but I am very hesitant to make this
> change without really understanding the code and possibly implications
> of this.
> Does anyone with further insight have some suggestion how this should
> be handled and/or if this really is a bug or just some
> misinterpretation by me?

I was looking at this code this morning for BUG27209:


The patch I've attached there should fix your problem too.  From your
description it sounds like it goes wrong when the retransmitted segment
contains the FIN for the end of the connection.  I noticed that this
wasn't being properly counted for in the sequence numbers when shrinking
the segment, and it would result in an out-by-one error like you
describe.  If you can test that patch and report back I would be very


reply via email to

[Prev in Thread] Current Thread [Next in Thread]