lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #25622] Lack of return code checks in tcp_listen_input


From: Roman Trunov
Subject: [lwip-devel] [bug #25622] Lack of return code checks in tcp_listen_input can cause incoming connections to become blocked.
Date: Thu, 12 Mar 2009 09:01:22 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; ru; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7

Follow-up Comment #4, bug #25622 (project lwip):

Look like I found more correct and generic solution by adding additional
logic to tcp_process(). If possible, please try this in your setup since you
can reproduce problem easily. Of course your patch must be removed first.

diff -u -r1.5 tcp_in.c
--- tcp_in.c    10 Mar 2009 14:05:53 -0000      1.5
+++ tcp_in.c    12 Mar 2009 08:54:52 -0000
@@ -624,6 +624,15 @@
     }
     break;
   case SYN_RCVD:
+    if ((flags & TCP_SYN) && !(flags & TCP_ACK)) {
+      /* Connection request repeated, may be our ACK was lost. Send another
one. */
+      u32_t optdata;
+      /* Build an MSS option. */
+      optdata = TCP_BUILD_MSS_OPTION();
+      /* Send a SYN|ACK together with the MSS option. */
+      tcp_enqueue(pcb, NULL, 0, TCP_SYN | TCP_ACK, 0, (u8_t *)&optdata, 4);
+      break;
+    }
     if (flags & TCP_ACK &&
        !(flags & TCP_RST)) {
       /* expected ACK number? */


    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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