[Top][All Lists]

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

[lwip-devel] Re: Out of order FINs, was Re: [bug #26267], Simultaneous c

From: Oleg Tychev
Subject: [lwip-devel] Re: Out of order FINs, was Re: [bug #26267], Simultaneous close
Date: Wed, 22 Apr 2009 16:51:48 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3pre) Gecko/20090223 Lightning/1.0pre Thunderbird/3.0b2

On 22.04.2009 15:28 you wrote,
On Wed, 2009-04-22 at 12:26 +0000, Oleg Tyshev wrote:
Follow-up Comment #14, bug #26267 (project lwip):

Exists one more issue with close of the connection.
FIN could be inserted to out of sequence queue.
If we want to support later shutdown() for sockets,
FIN should be accepted for transition to other TCP states only if it was
accepted in sequence.

Now tcp_receive() returns true for any segment that was received in sequence,
we could change it.
The function can return true if it was received FIN in sequence (in current
packet or as result of filling gap in out of sequence queue)

Replying to lwip-devel as it's a different issue to that bug.

This was raised yesterday in an email to lwip-devel by Ben Hastings
("Out of order segments in half close"), and I hope he'll file a bug to
track it.  You're right that we need a measure from tcp_receive() in the
case of a FIN to tell if the FIN has been received in sequence, or if it
is still queued - just looking at the return from tcp_receive() won't be
enough in that case.  Perhaps we could compare rcv_nxt after calling
tcp_receive() to the sequence number of the FIN?

Last packet could be not FIN packet.
FIN packet can be in out of sequence queue and last received packet only fill the gap.
May be better already in tcp_receive() analize that exists FIN packet in sequence and set any flag variable.
Actualy we have recv_flags variable and constant TF_GOT_FIN, but it looks like that it would be set too early.
It means in tcp_process() we shouldn't analize (flags & TCP_FIN), but this variable.
Note: packet in tcp_process() should be processed only if tcp_receive() doesn't reject it.


HIMA Paul Hildebrandt GmbH + Co KG, Postfach 12 61, 68777 Bruehl bei Mannheim
Kommanditgesellschaft, Sitz Bruehl, Deutschland - Registergericht Mannheim HRA 421017
Ust-ID: DE 144286400, St.Nr: 43038 00190

Persoenlich haftende Gesellschafterin Paul Hildebrandt Verwaltungsgesellschaft mbH,
Sitz Bruehl, Deutschland - Registergericht Mannheim HRB 420588

Geschaeftsfuehrer: Dipl.-Betriebswirt Steffen Philipp, Dipl.-Kfm. Peter Swiczinsky

reply via email to

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