lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #57710] Unable to reinitialize the TCP connection


From: Benjamin K
Subject: [lwip-devel] [bug #57710] Unable to reinitialize the TCP connection
Date: Mon, 3 Feb 2020 06:13:26 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36

Follow-up Comment #3, bug #57710 (project lwip):

First of all I suppose you are using IPv6? Since mld6_tmr should only be part
if IPv6 is active i.e. LWIP_IPV6_MLD and LWIP_IPV6 is set in lwipopts.h

Does your "Etherdo_connected" method set this KEEPALIVE flag for that
particular connection?

I suppose you method look like:

err_t Etherdo_connected(void *arg, struct tcp_pcb *newpcb, err_t err) {
    // do something
    ip_set_option(newpcb, SOF_KEEPALIVE);
}

I don't know if this is the right way to set that flag but it seems so because
the tcp_slowtmr periodically tests for that particular flag. Setting that flag
in your listen pcb should also be possible since it gets inherited according
to source code comments.

/* These flags are inherited (e.g. from a listen-pcb to a connection-pcb): */
#define SOF_INHERITED   (SOF_REUSEADDR|SOF_KEEPALIVE)

The pcb_tcp you are using as argument in tcp_write() is that "newpcb" from
your accept function I suppose? As I said, I usually uses the socket API for
that purpose.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?57710>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]