lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Browser finishes every HTTP GET request with a ACK RST,


From: Info
Subject: Re: [lwip-users] Browser finishes every HTTP GET request with a ACK RST, why ? [SOLVED]
Date: Tue, 5 Oct 2021 15:26:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0

Problem solved !

After activate the LWIP_HTTPD_SUPPORT_11_KEEPALIVE macro in the HTTPD web server, the problem is gone. And of course the periodic communication between the web server and the browser has much less overhead, because the connection is not closed after each request.

Thank you very much for all your answers.

Kind regards,
Roland

Am 24.09.21 um 10:35 schrieb Indan Zupancic:
Hello,

On 2021-09-15 15:37, Info wrote:
In the attached Wireshark capture file I can see many frames (from the
web browser) with the set ACK RST flags. For me it not clear why the
web browser sends this frames and if it is the reason for the broken
periodic communication ? Any help and maybe some explanation would be
very welcome.

I ran my own test for 8 hours, first few hours a HTTP request every 100 ms,
the others every 10 seconds. We're using our own webserver code without
any issues for a few years now.

In those 8 hours I get 8 resets, all in the first few hours during the 100ms test.
(This is with Windows 10 as host.)

All these resets happened when the port was re-used by the browser after 2 seconds of a previous transaction. Our TIME WAIT is configured for 2 seconds (TCP_MSL 1000).

What I see happening is that lwIP sends an ACK with the same sequence number as previously, instead of a SYN, ACK. The other side of course doesn't like
that and sends a RST.

This does not fully explain everything in your Wireshark log, but maybe it is related.

Looking at the code, this behaviour is intentional and done in tcp_timewait_input().
Reading the RFCs this behaviour is by design and lwIP does nothing wrong.

The reason why ports are re-used so quickly is probably because they're chosen randomly. If the host just resends a new SYN and does not return an error to the browser this
behaviour is fine.

Greetings,

Indan




reply via email to

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