Re: [lwip-users] LWIP and its keep-alive feature - does it work?

2022-12-20 Thread Simon Goldschmidt


Peter  wrote:
>
>[..] if say the server is rebooted during a connection, the
>connection is not re-established. Maybe that is how it is supposed to
>work

Yes, that's why it is called "keepalive", not "re-establish broken 
connections". By the way, it's not an lwip thing but an implementation of 
generic TCP concepts.

> i.e. if one wanted to re-establish a connection in such a
>situation, the client should be sending out regular "real" packets,
>not KA packets.

Exactly. If the server is restarted, there's no way a keepalive packet would do 
anything good. You need to send SYN packets to establish a new connection.

Regards,
Simon

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users


[lwip-users] LWIP and its keep-alive feature - does it work?

2022-12-20 Thread Peter

Hi All,

Does anyone know whether the keep-alive feature in LWIP TCP actually
works, and if so, are there any unusual limitations?

I have a system described here
https://www.eevblog.com/forum/networking/sockets-keep-alive-and-vpns/

comprising of a client and a server (both embedded, LWIP/FreeRTOS, STM
32F417). The KA option is apparently enabled with the calls described
in the above link, and it seems to do "something" (in that if running
this over a VPN, the VPN remains UP, instead of hanging up after some
time) but if say the server is rebooted during a connection, the
connection is not re-established. Maybe that is how it is supposed to
work i.e. if one wanted to re-establish a connection in such a
situation, the client should be sending out regular "real" packets,
not KA packets.

Needless to say I have googled everywhere and all I find is people
having problems with LWIP KA but nobody posting solutions.

Thank you in advance,

Peter

___
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users