lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #9039] tcp: Avoid 3-second delay for a half-open con


From: Simon Goldschmidt
Subject: [lwip-devel] [patch #9039] tcp: Avoid 3-second delay for a half-open connection
Date: Mon, 4 Jul 2016 08:19:03 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

URL:
  <http://savannah.nongnu.org/patch/?9039>

                 Summary: tcp: Avoid 3-second delay for a half-open connection
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: Mon 04 Jul 2016 08:19:01 AM GMT
                Category: TCP
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 2.0.0 Beta2

    _______________________________________________________

Details:

Received on lwip-devel, 2016-07-04:

Fix by immediately retransmitting the SYN whenever a half-open
connection is detected.

Signed-off-by: Michael Brown <address@hidden>
---
src/core/tcp_in.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/src/core/tcp_in.c b/src/core/tcp_in.c
index f291887..5e7f2cd 100644
--- a/src/core/tcp_in.c
+++ b/src/core/tcp_in.c
@@ -812,6 +812,9 @@ tcp_process(struct tcp_pcb *pcb)
/* send a RST to bring the other side in a non-synchronized state. */
tcp_rst(ackno, seqno + tcplen, ip_current_dest_addr(),
ip_current_src_addr(), tcphdr->dest, tcphdr->src);
+ /* Resend SYN immediately to establish connection */
+ pcb->rtime = 0;
+ tcp_rexmit_rto(pcb);
}
break;
case SYN_RCVD:
-- 
2.3.8




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9039>

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




reply via email to

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