lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Problem with http connections


From: Simon Goldschmidt
Subject: Re: [lwip-users] Problem with http connections
Date: Thu, 10 Aug 2023 20:55:09 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

I'm not 100% sure what you think has changed, but the "reuseaddr" part
should not have changed that much between 2.0.0 and 2.1.2 to result in
this change.

Regards,
Simon

On 09.08.2023 21:35, dwsexton@dwstech-llc.com wrote:
Found solution: Apparently in LWIP 2.0.0 you could bind a socket right
after closing it, so for a server if you created a socket, did  bind,
listen accept then send and then close you could not immediately repeat
the process without an address in use error even if the socket options
were set to reuse address. I fixed this in 2.1.2 by keeping the bound
listening socket and continued to use it to accept new connections on
the same port (port 80). My little Web server now work again with 2.1.2.
It took a little bit to find this as I w2as not expecting this change in
behavior but once I noticed that the bind was failing with an address
reuse error and a little digging I figured out how to correct it.

*From:*lwip-users-bounces+dwsexton=dwstech-llc.com@nongnu.org
<lwip-users-bounces+dwsexton=dwstech-llc.com@nongnu.org> *On Behalf Of
*dwsexton@dwstech-llc.com
*Sent:* Thursday, August 3, 2023 8:30 AM
*To:* 'Mailing list for lwIP users' <lwip-users@nongnu.org>
*Subject:* Re: [lwip-users] Problem with http connections

Correction, the upgrade was to 2.1.2 not 2.0.2.

Dan Sexton

*From:*lwip-users-bounces+dwsexton=dwstech-llc.com@nongnu.org
<mailto:lwip-users-bounces+dwsexton=dwstech-llc.com@nongnu.org>
<lwip-users-bounces+dwsexton=dwstech-llc.com@nongnu.org
<mailto:lwip-users-bounces+dwsexton=dwstech-llc.com@nongnu.org>> *On
Behalf Of *dwsexton@dwstech-llc.com <mailto:dwsexton@dwstech-llc.com>
*Sent:* Thursday, August 3, 2023 8:06 AM
*To:* lwip-users@nongnu.org <mailto:lwip-users@nongnu.org>
*Subject:* [lwip-users] Problem with http connections

I have a product based on the STM32F407 that has been working since
2017. It has both a home brew web server and a telnet server both using
LWIP to listen for clients.

The product uses LWIP 2.0.0 and I recently tried to upgrade to LWIP
2.0.2 but some issues have popped up. During the upgrade I did not
change any of my application code.

The Telnet server still works just fine, accepts connections and
communicates as expected.

However, the Web Server listening on port 80 no longer works,
connections seem to be rejected. Both Telnet and the web server share
the same code for setting up the server (different ports of course),
listening for and accepting connections. Is there something in 2.0.2 the
intercepts port 80 traffic or http requests, possibly a new option that
needs to be turned off? I searched the reflector and did not see
anything, a google search didn’t turn up anything as well.  I can share
a wireshark trace but I suspect the answer is simpler than setting that
up. I also have a Modbus TCP server running but have not even tried that
yet as I can’t get passed testing the web server.

Thanks

Dan Sexton


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



reply via email to

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