buglwIP - A Lightweight TCP/IP stack - Bugs: bug #32820, Outgoing TCP connections created...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #32820: Outgoing TCP connections created before route is present never times out

Submitted by:  Hans Petter Selasky <hps>
Submitted on:  Thu 17 Mar 2011 12:28:51 PM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: 1.3.1

Sun 27 Mar 2011 01:06:24 PM UTC, comment #2:

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 22 Mar 2011 08:39:30 PM UTC, comment #1:

The fix looks perfectly valid to me. The lines do not match CVS HEAD, though. The code in question has been moved to around line 1098.

Anyone against this going in to 1.4.0? The change does not have any effect except for starting the retransmission timer if ip_route() returns NULL (in which case it just returns now).

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 17 Mar 2011 12:28:51 PM UTC, original submission:

Hi,

It appears that outgoing TCP connections never time out if they are created before the default interface becomes active. The following patch moves the timeout activation some lines up before the default route presence is tested.

Index: lwip/src/core/tcp_out.c
===================================================================
--- lwip/src/core/tcp_out.c (revision 2831)
+++ lwip/src/core/tcp_out.c (working copy)
@@ -697,6 +697,11 @@
}
#endif

+ /* Set retransmission timer running if it is not currently enabled.
+ * This must be set before checking the route. */
+ if (pcb->rtime == -1)
+ pcb->rtime = 0;
+
/* If we don't have a local IP address, we get one by
calling ip_route(). */
if (ip_addr_isany(&(pcb->local_ip))) {
@@ -707,10 +712,6 @@
ip_addr_set(&(pcb->local_ip), &(netif->ip_addr));
}

- /* Set retransmission timer running if it is not currently enabled */
- if(pcb->rtime == -1)
- pcb->rtime = 0;
-
if (pcb->rttest == 0) {
pcb->rttest = tcp_ticks;
pcb->rtseq = ntohl(seg->tcphdr->seqno);

--HPS

Hans Petter Selasky <hps>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by hps (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Mar 2011 01:06:24 PM UTCgoldsimonStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Tue 22 Mar 2011 08:47:16 PM UTCgoldsimonPlanned Release=>1.4.0
    Tue 22 Mar 2011 08:39:30 PM UTCgoldsimonStatusNone=>In Progress
      Assigned toNone=>goldsimon

    Back to the top


    Powered by Savane 3.1-cleanup1