lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state


From: Oleg Tyshev
Subject: [lwip-devel] [bug #26251] RST process in TIME_WAIT TCP state
Date: Mon, 19 Oct 2009 14:36:51 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 GTB5

Follow-up Comment #3, bug #26251 (project lwip):

OK, with RST agree with you:
ignore means send nothing.

Now each data packet in TIME_WAIT state will be acknowledged.
tcp_timewait_input() -> tcp_output()

In tcp_output()

if (pcb->flags & TF_ACK_NOW &&
    (seg == NULL || ... ) {
   ....
   tcphdr->ackno = htonl(pcb->rcv_nxt);
   ....
 ip_output(p ...);
 return ERR_OK;
}

In TIME_WAIT we already received all data and seems to me rcv_nxt should not
be changed.

---

Some general notes about tcp_timewait_input() function:

We have following implementation for tcp_ack_now
#define tcp_ack_now(pcb) (pcb)->flags |= TF_ACK_NOW; 
                         tcp_output(pcb)
It means for (tcplen > 0)
 function tcp_output would be called twice.
It is not bad, but we can avoid it.

  if (tcplen > 0) {
-    tcp_ack_now(pcb);
+    pcb->flags |= TF_ACK_NOW;
  }
  return tcp_output(pcb);


    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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