[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #45433] Endless loop in tcp_slowtmr
From: |
Michael Tempest |
Subject: |
[lwip-devel] [bug #45433] Endless loop in tcp_slowtmr |
Date: |
Fri, 17 Mar 2017 04:27:54 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0 |
Follow-up Comment #6, bug #45433 (project lwip):
I'm using lwIP 1.4.1.
I think the problem is before the switch statement in tcp_close_shutdown, just
after the comment /* TODO: to which state do we move now? */
I enabled TCP_DEBUG_PCB_LISTS and an assert fails in TCP_REG following the
TODO comment.
This change seems to address the problem for me
static err_t
tcp_close_shutdown(struct tcp_pcb *pcb, u8_t rst_on_unacked_data)
{
err_t err;
if (rst_on_unacked_data && (pcb->state != LISTEN)) {
if ((pcb->refused_data != NULL) || (pcb->rcv_wnd != TCP_WND)) {
/* Not all data received by application, send RST to tell the remote
side about this. */
LWIP_ASSERT("pcb->flags & TF_RXCLOSED", pcb->flags & TF_RXCLOSED);
/* don't call tcp_abort here: we must not deallocate the pcb since
that might not be expected when calling tcp_close */
tcp_rst(pcb->snd_nxt, pcb->rcv_nxt, &pcb->local_ip, &pcb->remote_ip,
pcb->local_port, pcb->remote_port);
tcp_pcb_purge(pcb);
/* TODO: to which state do we move now? */
/* move to TIME_WAIT since we close actively */
if (pcb->state != TIME_WAIT)//MT
{//MT
// MT: Don't put into tcp_tw_pcbs if it is *already* in tcp_tw_pcbs
TCP_RMV(&tcp_active_pcbs, pcb);
pcb->state = TIME_WAIT;
TCP_REG(&tcp_tw_pcbs, pcb);
}//MT
return ERR_OK;
}
}
switch (pcb->state) {
...
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?45433>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/