Remove PCBs which stay in LAST_ACK state too long.

This commit is contained in:
likewise 2005-12-20 11:03:18 +00:00
parent 7571fe5d13
commit f8663a7129
2 changed files with 13 additions and 2 deletions

View File

@ -11,8 +11,12 @@ FUTURE
HISTORY
2005-12-20 Leon Woestenberg <leon.woestenberg@gmx.net>
* tcp.c: Remove PCBs which stay in LAST_ACK state too long. Patch
submitted by Mitrani Hiroshi.
2005-12-15 Christiaan Simons
* inet.c: Standard checksum routine fixed in proper portable C.
* inet.c: Disabled the added summing routine to preserve code space.
2005-12-14 Leon Woestenberg <leon.woestenberg@gmx.net>
* inet.c: Duplicate FIN ACK race condition fix by Kelvin Lawson.

View File

@ -555,12 +555,19 @@ tcp_slowtmr(void)
/* Check if this PCB has stayed too long in SYN-RCVD */
if (pcb->state == SYN_RCVD) {
if ((u32_t)(tcp_ticks - pcb->tmr) >
TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) {
TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in SYN-RCVD\n"));
}
}
/* Check if this PCB has stayed too long in LAST-ACK */
if (pcb->state == LAST_ACK) {
if ((u32_t)(tcp_ticks - pcb->tmr) > 2 * TCP_MSL / TCP_SLOW_INTERVAL) {
++pcb_remove;
LWIP_DEBUGF(TCP_DEBUG, ("tcp_slowtmr: removing pcb stuck in LAST-ACK\n"));
}
}
/* If the PCB should be removed, do it. */
if (pcb_remove) {