]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/blobdiff - src/core/tcp_out.c
Tried to fix bug #32417 ("TCP_OVERSIZE seems to have problems with (fast-)retransmiss...
[pes-rpp/rpp-lwip.git] / src / core / tcp_out.c
index 2b1319c5c0d2cdb29ed655d457c2fb875016a707..1a6ff53b6e93bedbd71d59575b27ac9e1335c6c3 100644 (file)
@@ -1256,6 +1256,7 @@ tcp_rexmit_rto(struct tcp_pcb *pcb)
   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;
@@ -1296,6 +1297,12 @@ tcp_rexmit(struct tcp_pcb *pcb)
   }
   seg->next = *cur_seg;
   *cur_seg = seg;
+#if TCP_OVERSIZE
+  if (seg->next == NULL) {
+    /* the retransmitted segment is last in unsent, so reset unsent_oversize */
+    pcb->unsent_oversize = 0;
+  }
+#endif /* TCP_OVERSIZE */
 
   ++pcb->nrtx;