lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #8237] tcp_rexmit_rto fails to update pcb->unsent_ov


From: Brian Fahs
Subject: [lwip-devel] [patch #8237] tcp_rexmit_rto fails to update pcb->unsent_oversize when necessary
Date: Tue, 12 Nov 2013 19:10:44 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36

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

                 Summary: tcp_rexmit_rto fails to update pcb->unsent_oversize
when necessary
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: bfahs
            Submitted on: Tue 12 Nov 2013 07:10:44 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c
index b9fc339..524416e 100644
--- a/src/core/tcp_out.c
+++ b/src/core/tcp_out.c
@@ -1261,11 +1261,21 @@ tcp_rexmit_rto(struct tcp_pcb *pcb)
   for (seg = pcb->unacked; seg->next != NULL; seg = seg->next);
   /* concatenate unsent queue after unacked queue */
   seg->next = pcb->unsent;
+#if TCP_OVERSIZE
+  /* if last unsent changed, we need to update unsent_oversize */
+  if (pcb->unsent == NULL) {
+#if TCP_OVERSIZE_DBGCHECK
+    pcb->unsent_oversize = seg->oversize_left;
+#else
+    /* Punt on figuring this out since we always use TCP_OVERSIZE_DBGCHECK
*/
+#error "Without tcp_seg.oversize_left, how can unsent_oversize be updated?"
+#endif /* TCP_OVERSIZE_DBGCHECK */
+  }
+#endif /* TCP_OVERSIZE */
   /* unsent queue is the concatenated queue (of unacked, unsent) */
   pcb->unsent = pcb->unacked;
   /* unacked queue is now empty */
   pcb->unacked = NULL;
-  /* last unsent hasn't changed, no need to reset unsent_oversize */
 
   /* increment number of retransmissions */
   ++pcb->nrtx;





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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