[Top][All Lists]

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

[lwip-devel] TCP sequence number wrap

From: MK
Subject: [lwip-devel] TCP sequence number wrap
Date: Sun, 10 Apr 2011 01:10:33 -0400

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


reply via email to

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