lwip-devel
[Top][All Lists]
Advanced

[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:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 GTB5

URL:
  <http://savannah.nongnu.org/bugs/?26267>

                 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

    _______________________________________________________

Details:

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:
tcp_receive(pcb);
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.
tcp_ack_now(pcb);
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:
olegreen

<http://savannah.nongnu.org/bugs/download.php?file_id=17982>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?26267>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

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