patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8237, tcp_rexmit_rto fails to update...

 
 

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

patch #8237: tcp_rexmit_rto fails to update pcb->unsent_oversize when necessary

Submitter:  Brian Fahs <bfahs>
Submitted:  Tue 12 Nov 2013 07:10:44 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Sat 18 Jan 2014 08:41:21 PM UTC, comment #3: 

Ok, but in that case, the patch does nothing unless TCP_OVERSIZE_DBGCHECK==1 and the line you marked with #error does no harm.

Thanks for the patch.

Simon Goldschmidt <goldsimon>
Group administrator
Tue 14 Jan 2014 09:01:43 PM UTC, comment #2: 

If not fixed, the assertion "unsent_oversize mismatch (pcb vs. last_unsent)" can fire in tcp_out.c.

Brian Fahs <bfahs>
Tue 14 Jan 2014 08:42:53 PM UTC, comment #1: 

Does it really matter that pcb->unsent_oversize is not updated here? The segment in question has alreay been transmitted without adding data, so it should not really be necessary that we add data now when it is retransmitted?

Simon Goldschmidt <goldsimon>
Group administrator
Tue 12 Nov 2013 07:10:44 PM UTC, original submission:  

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;

Brian Fahs <bfahs>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-18 goldsimon StatusNeed Info Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2014-01-14 goldsimon StatusNone Need Info
    2013-11-12 bfahs Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code