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: Wed, 22 Apr 2009 09:20:09 +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

Follow-up Comment #10, bug #26267 (project lwip):

If we wait ACK to the FIN, we should compare not with pcb->snd_nxt but with
pcb->snd_max.

case CLOSING:
tcp_receive(pcb);
-if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
+if (flags & TCP_ACK && ackno == pcb->snd_max) {
LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed %"U16_F" -> %"U16_F".n",
inseg.tcphdr->src, inseg.tcphdr->dest));
tcp_ack_now(pcb);

It works.

I think the same should be done for FIN_WAIT_1 and LAST_ACK

case FIN_WAIT_1:
tcp_receive(pcb);
if (flags & TCP_FIN) {
-if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
+if (flags & TCP_ACK && ackno == pcb->snd_max) {
LWIP_DEBUGF(TCP_DEBUG,

case LAST_ACK:
tcp_receive(pcb);
if (flags & TCP_ACK && ackno == pcb->snd_max) {





    _______________________________________________________

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]