mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
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:
parent
07c610e068
commit
5c68bbe16f
@ -69,6 +69,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
|
||||
|
||||
|
@ -1090,6 +1090,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 */
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user