[Top][All Lists]

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

Re: [lwip-devel] TCP sequence number wrap

From: MK
Subject: Re: [lwip-devel] TCP sequence number wrap
Date: Sun, 10 Apr 2011 12:20:03 -0400

Ooi, I did see it uses macros but did not go and look at what they do.
I am sorry, should have looked more carefully before disturbing


On Sun, Apr 10, 2011 at 8:19 AM, Simon Goldschmidt <address@hidden> wrote:
> LwIP uses macros to compare the sequence numbers. These macros are written in 
> a way that they can handle wrap-arounds. There's always the possibility of a 
> bug, of course, but I expect it to work,
> Simon
>  MK <address@hidden> wrote:
>> Hi all,
>> For a very long running connection, it is possible for TCP sequence
>> numbers to wrap around. I am wondering how does LWIP handle this? This
>> is not so unlikely since the peer stack may be randomizing its Initial
>> Sequence Number and so the chances of wrapping around are higher if it
>> starts from a very big ISN
>> From the code in tcp_receive(), it seems as if LWIP does not handle
>> this situation and it will cause all packets with wrapped sequence
>> numbers to be discarded.
>> Any thoughts on how involved is it to fix this?
>> It seems that the thing to do would be - Instead of having checks to
>> see if the sequence number of the incoming packet is less than
>> pcb->rcv_nxt, maybe we should make it so that an incoming packet is
>> declared to be unacceptable if it is outside our advertised window,
>> else it is acceptable and should be further inspected to handle all
>> cases (does it wrap or not) ?
>> I am sure there are other places that will need to be changed also though...
>> Thanks!
>> MK
>> _______________________________________________
>> lwip-devel mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/lwip-devel
> _______________________________________________
> lwip-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-devel

reply via email to

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