lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #26069] Connect to a remote IP address which is not pr


From: Rikke Ottesen
Subject: [lwip-devel] [bug #26069] Connect to a remote IP address which is not present makes the APP hang
Date: Thu, 02 Apr 2009 13:42:02 +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

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

                 Summary: Connect to a remote IP address which is not present
makes the APP hang
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: ro03
            Submitted on: Thu 02 Apr 2009 01:42:00 PM 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: 1.3.0

    _______________________________________________________

Details:

Problem:
Calling tcp_connect() with a remote IP address which is not present; 
The pcb->state = SYN_SENT

The connection never succeeds, because the remote side is not present.

Resolution:
The tcp_slowtmr(void) function should check on the SYN_SENT state and after a
while ....

    if (pcb->state == SYN_SENT) {
      if ((u32_t)(tcp_ticks - pcb->tmr) > 10) {
        ++pcb_remove;
        LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in
SYN_SENT\n"));
      }
    }


...remove the PCB and call the callback function  with an error
TCP_EVENT_CONNECTED(). Otherwise the APP whil hang!

I have added the changes I made. Search for CSR begin and you'll find the
code added. The number 10 I have hardcoded should of cause be changed. This
was just for testing.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 02 Apr 2009 01:42:00 PM GMT  Name: tcp.c  Size: 43kB   By: ro03

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

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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