[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Unusual termination of a TCP connection.
From: |
Roger Cover |
Subject: |
Re: [lwip-users] Unusual termination of a TCP connection. |
Date: |
Thu, 29 Sep 2016 13:32:06 -0700 |
Greetings,
Thank you all for your replies. I now have determined that I asked the wrong
question, so I will ask the correct question.
For clarity: I am using the callback interface of lwIP. I have 2 servers
implemented. One (192.168.0.175) I implemented about 11 years ago using lwIP
1.2.0. The other (192.168.0.176) I am implementing now using lwIP 1.4.1. The
behavior of these two servers is quite different.
In the attached Wireshark capture files I note that the lwIP 1.2.0 server
always sends ACKs for the request (GET or POST) packets before sending the data
requested. The TCP transaction then terminates normally. The lwIP 1.4.1 server
sends the requested data before sending ACKs for the request. This causes lwIP
1.4.1 to send RST in response to the client closing the connection without
waiting for the ACKs.
Why does lwIP 1.4.1 not send ACKs before sending the data from my server? Is
there some setting that I have neglected? I would like the TCP transactions to
terminate normally as they do using lwIP 1.2.0. I look forward to your reply.
Regards,
Roger
-----Original Message-----
From: lwip-users [mailto:address@hidden On Behalf Of Roger Cover
Sent: Wednesday, September 28, 2016 1:34 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Unusual termination of a TCP connection.
Greetings,
In the Wireshark capture that I sent in my original post, the data sent from
the server is ACKed by the same packet that contains the FIN. The lwIP 1.3.1
server responds to this packet with a RST packet. I am curious why lwIP 1.4.1
responds this way when lwIP 1.2.0 responds with ACK+FIN instead. Why are the
two different?
Regards,
Roger
-----Original Message-----
From: lwip-users [mailto:address@hidden On Behalf Of goldsimon
Sent: Wednesday, September 28, 2016 1:22 PM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] Unusual termination of a TCP connection.
A RST is sent when lwip knows that one of the two sides has not read (or
packed) all data that has been sent. This is what standard socket stacks would
do also.
Simon
Gesendet mit AquaMail für Android
http://www.aqua-mail.com
Am 28. September 2016 7:32:05 nachm. schrieb Roger Cover <address@hidden>:
> Greetings,
>
> I have a server application using lwIP 1.4.1. When I use a Python
> program to connect to my server, the server always terminates the TCP
> connection with a RST instead of a FIN packet. The RST appears to be
> negatively impacting the performance of my communications. I have
> attached a Wireshark capture of the traffic in the attached file
> lwIP141.pcapng. In this file my server is at address 192.168.0.175.
>
> I previously implemented a server using the lwIP 1.2.0 library (about
> a decade ago), and did not encounter this problem. The attached file
> lwip120.pcapng is a Wireshark capture of the same Python program
> communicating with the old lwIP 1.2.0 server. In this file my server
> is at address 192.168.0.175. Using lwIP 1.2.0 the TCP connection
> terminates normally with a FIN, FIN+ACK, ACK set.
>
> Does anyone have any insight into why the RST is being issued? Is
> there anything I can do to eliminate this problem? I look forward to your
> reply.
>
> Regards,
> Roger W. Cover
> Spectral Instruments, Inc.
> 420 N. Bonita Ave.
> Tucson, AZ 85745
> 520-884-8821 ext. 144
>
>
>
> ----------
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
lwip120.pcapng
Description: lwip120.pcapng
lwip141.pcapng
Description: lwip141.pcapng