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: dwsexton
Subject: Re: [lwip-users] Problem with http connections
Date: Wed, 9 Aug 2023 15:35:10 -0400

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 <lwip-users-bounces+dwsexton=dwstech-llc.com@nongnu.org> On Behalf Of dwsexton@dwstech-llc.com
Sent: Thursday, August 3, 2023 8:06 AM
To: 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


reply via email to

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