From 32b1a9fc8a335c4c771023dd8ace9db9fd814ad1 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Sat, 18 Jan 2014 21:40:17 +0100 Subject: [PATCH] patch #8237 by Brian Fahs: tcp_rexmit_rto fails to update pcb->unsent_oversize when necessary --- CHANGELOG | 4 ++++ src/core/tcp_out.c | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 4d3cb8ad..138b7af8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -84,6 +84,10 @@ HISTORY ++ Bugfixes: + 2014-01-18: Brian Fahs + * tcp_out.c: patch #8237: tcp_rexmit_rto fails to update pcb->unsent_oversize + when necessary + 2014-01-17: Grant Erickson, Jay Logue, Simon Goldschmidt * ipv6.c, netif.c: patch #7913 Enable Support for IPv6 Loopback diff --git a/src/core/tcp_out.c b/src/core/tcp_out.c index b9fc339e..b78ee285 100644 --- a/src/core/tcp_out.c +++ b/src/core/tcp_out.c @@ -1261,11 +1261,16 @@ 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 && TCP_OVERSIZE_DBGCHECK + /* if last unsent changed, we need to update unsent_oversize */ + if (pcb->unsent == NULL) { + pcb->unsent_oversize = seg->oversize_left; + } +#endif /* TCP_OVERSIZE && TCP_OVERSIZE_DBGCHECK*/ /* 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;