Re: [lwip-users] Unusual termination of a TCP connection.

2016-10-04 Thread goldsi...@gmx.de

Roger Cover wrote:

I am not familiar with the internal organization of the lwIP library. Which 
debug statements should I turn on to find out what is happening in this case?


I'm sorry but I cannot tell you that right now. The simplest thing would 
be to get someone with more knowledge to reproduce this. However, I'm 
afraid I don't have the time for this currently.


Simon

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


Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-30 Thread Roger Cover
Greetings,

Thank you Simon for your reply. I am not familiar with the internal 
organization of the lwIP library. Which debug statements should I turn on to 
find out what is happening in this case? A bit of assistance in that would be 
greatly appreciated.

Regards,
Roger
-Original Message-
From: lwip-users [mailto:lwip-users-bounces+rcover=specinst@nongnu.org] On 
Behalf Of Simon Goldschmidt
Sent: Thursday, September 29, 2016 11:14 PM
To: lwip-users@nongnu.org
Subject: Re: [lwip-users] Unusual termination of a TCP connection.

Roger Cover wrote:
> Thank you all for your replies.

No answer often means noone knows what your problem is.

> [..] the lwIP 1.2.0 server always sends ACKs for the request (GET or 
> POST) packets before sending the data requested. [..] The lwIP 1.4.1 
> server sends the requested data before sending ACKs for the request.

I don't know exactly (the 1.2.0 release was even before my active time in lwIP) 
but I guess there has been an optimization after 1.2.0 to not send the ACK as a 
seperate packet. Instead, the ACK should piggy-back on the response data 
segment.
And this is what I see in my servers, too.

You say are seeing the data before the ACK but from reading 'lwip141.pcapng', 
the server does exactly what I said in the last paragraph.

However, I see a strang usage of HTTP: your server responds with HTTP 1.0 but 
does not add a connection header. This means the server should close the 
connection, not the client. In this case, it's OK for the server to respond 
with RST.

This might however still not be a sufficient explanation of why the RST is sent 
or what you could do to prevent it being sent.


Simon

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

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


Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-30 Thread Simon Goldschmidt
Roger Cover wrote:
> Thank you all for your replies.

No answer often means noone knows what your problem is.

> [..] the lwIP 1.2.0 server always sends ACKs for the request (GET or POST)
> packets before sending the data requested. [..]
> The lwIP 1.4.1 server sends the requested data before sending ACKs for the 
> request.

I don't know exactly (the 1.2.0 release was even before my active time in lwIP)
but I guess there has been an optimization after 1.2.0 to not send the ACK as a
seperate packet. Instead, the ACK should piggy-back on the response data 
segment.
And this is what I see in my servers, too.

You say are seeing the data before the ACK but from reading 'lwip141.pcapng',
the server does exactly what I said in the last paragraph.

However, I see a strang usage of HTTP: your server responds with HTTP 1.0 but 
does
not add a connection header. This means the server should close the connection,
not the client. In this case, it's OK for the server to respond with RST.

This might however still not be a sufficient explanation of why the RST is sent
or what you could do to prevent it being sent.


Simon

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


Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-29 Thread Roger Cover
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:lwip-users-bounces+rcover=specinst@nongnu.org] 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:lwip-users-bounces+rcover=specinst@nongnu.org] 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 <rco...@specinst.com>:

> 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
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users



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


lwip120.pcapng
Description: lwip120.pcapng


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

Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-28 Thread Roger Cover
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:lwip-users-bounces+rcover=specinst@nongnu.org] 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 <rco...@specinst.com>:

> 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
> lwip-users@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/lwip-users



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

Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-28 Thread goldsimon
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 :


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
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users




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

Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-28 Thread Roger Cover
Greetings,

I am using the callback API. Sorry I did not mention that. What more details do 
you want?

The content-length=0 is due to the old server not supporting the command to 
report its version in the same way. There is no additional data waiting to be 
sent. This is a side effect of using the same program to do both tests with 
just a file name change.

Regards,
Roger
-Original Message-
From: lwip-users [mailto:lwip-users-bounces+rcover=specinst@nongnu.org] On 
Behalf Of Sergio R. Caprile
Sent: Wednesday, September 28, 2016 11:18 AM
To: lwip-users@nongnu.org
Subject: Re: [lwip-users] Unusual termination of a TCP connection.

I see what you mean.
I also see that the 1.2.0 version sent content-length=0 and the 1.4.1 version 
sends content-length=115 IIRC, this is not unusual, lwIP might be indicating 
that there is still data to be sent. Is it possible that you left some data in 
the buffer ?
Thank you very much indeed for the capture files, could you be even nicer and 
tell us how you use lwIP's API, and, by the way, which one ?

-- 


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

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


Re: [lwip-users] Unusual termination of a TCP connection.

2016-09-28 Thread Sergio R. Caprile

I see what you mean.
I also see that the 1.2.0 version sent content-length=0 and the 1.4.1 
version sends content-length=115
IIRC, this is not unusual, lwIP might be indicating that there is still 
data to be sent. Is it possible that you left some data in the buffer ?
Thank you very much indeed for the capture files, could you be even 
nicer and tell us how you use lwIP's API, and, by the way, which one ?


--


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