]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
Fixed bug #32820 (Outgoing TCP connections created before route is present never...
authorgoldsimon <goldsimon>
Sun, 27 Mar 2011 13:00:54 +0000 (13:00 +0000)
committergoldsimon <goldsimon>
Sun, 27 Mar 2011 13:00:54 +0000 (13:00 +0000)
CHANGELOG
src/core/tcp_out.c

index b5c8d835a948babf5ce4f24fe490bf7969a2d480..475fd15352f176c9bcde712095703533ccf91a68 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -13,7 +13,7 @@ HISTORY
 
   ++ New features:
 
-  2011-03-22: Simon Goldschmidt
+  2011-03-27: Simon Goldschmidt
   * tcp_impl.h, tcp_in.c, tcp_out.c: Removed 'dataptr' from 'struct tcp_seg' and
     calculate it in tcp_zero_window_probe (the only place where it was used).
 
@@ -237,6 +237,11 @@ HISTORY
 
   ++ Bugfixes:
 
+  2011-03-27: Simon Goldschmidt
+  * tcp_out.c: Fixed bug #32820 (Outgoing TCP connections created before route
+    is present never times out) by starting retransmission timer before checking
+    route.
+
   2011-03-22: Simon Goldschmidt
   * ppp.c: Fixed bug #32648 (PPP code crashes when terminating a link) by only
     calling sio_read_abort() if the file descriptor is valid.
index 6e59e1f797a47727a180abad534e8f1d4482d829..86e0919531fe638bc8ddb5633f257ebfadda7e3a 100644 (file)
@@ -1078,6 +1078,12 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb)
   }
 #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))) {
@@ -1088,11 +1094,6 @@ tcp_output_segment(struct tcp_seg *seg, struct tcp_pcb *pcb)
     ip_addr_copy(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);