Tried to fix bug #32417 ("TCP_OVERSIZE seems to have problems with (fast-)retransmission"): Reset pcb->unsent_oversize in 2 more places...

This commit is contained in:
Simon Goldschmidt 2011-09-29 21:12:34 +02:00 committed by goldsimon
parent ca6fd6015c
commit 5cfef5bf48
3 changed files with 15 additions and 0 deletions

View File

@ -49,6 +49,9 @@ HISTORY
++ Bugfixes:
2011-09-27: Simon Goldschmidt
* tcp_in.c, tcp_out.c: Reset pcb->unsent_oversize in 2 more places...
2011-09-27: Simon Goldschmidt
* tcp_in.c: fixed bug #28288: Data after FIN in oos queue

View File

@ -1078,6 +1078,11 @@ tcp_receive(struct tcp_pcb *pcb)
next = pcb->unsent;
pcb->unsent = pcb->unsent->next;
#if TCP_OVERSIZE
if (pcb->unsent == NULL) {
pcb->unsent_oversize = 0;
}
#endif /* TCP_OVERSIZE */
LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_receive: queuelen %"U16_F" ... ", (u16_t)pcb->snd_queuelen));
LWIP_ASSERT("pcb->snd_queuelen >= pbuf_clen(next->p)", (pcb->snd_queuelen >= pbuf_clen(next->p)));
/* Prevent ACK for FIN to generate a sent event */

View File

@ -1250,6 +1250,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;
@ -1290,6 +1291,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;