[Top][All Lists]

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

[lwip-devel] [bug #26267] Simultaneous close

From: Oleg Tyshev
Subject: [lwip-devel] [bug #26267] Simultaneous close
Date: Tue, 21 Apr 2009 09:19:14 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/2009032609 Firefox/3.0.8 GTB5


                 Summary: Simultaneous close
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: olegreen
            Submitted on: Tue 21 Apr 2009 09:19:12 AM GMT
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head



It seems to me simultaneous close doesn't work right way.

Host1 and host2 sends data each other.
Cable between hosts is disconnected.
Host1 and host2 makes close().
Host1 and host2 are in FIN_WAIT_1 state.
Cable between hosts is connected again.

host1 retransmits FIN

host2 receives this FIN,ACK
in tcp_process()
case FIN_WAIT_1:
if (flags & TCP_FIN) {
if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
} else {
!!! we are here
!!! tcp_ack_sends only ACK without data and without FIN
!!! because unsent queue is empty and FIN placed in unacked queue.
pcb->state = CLOSING;
} else if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
pcb->state = FIN_WAIT_2;

Now host2 in CLOSING state.
Host2 again receives FIN,ACK and ... it goes to TIME_WAIT


File Attachments:

Date: Tue 21 Apr 2009 09:19:12 AM GMT  Name: simult.pcap  Size: 2kB   By:



Reply to this item at:


  Message sent via/by Savannah

reply via email to

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