TCP Window Update not working

My setting:

Client(Windows, firefox-browser) ----- WAN-Router(socat)-LAN ----- Server(embedded-device)

Router:

  • device: GL-MT300Nv2
  • openwrt: OpenWrt 19.07-SNAPSHOT, r10194+113-c53f62b111

My scenario:

  1. client sends data (~1MB) to server through the router
  2. buffer of server runs full and responds a window size value of 0 to the router (at this point the router buffered all data which couldn't been send to the device before the device reported window size value 0. This is about ~ 250k)
  3. router tries to resend with exponentially backoff time but server responses with window size value of 0
  4. server tells router that new space is available by sending an empty package with window size value of 1436 Bytes.
  5. router ignores this message but normally has to continue sending new packages.

wireshark-screenshot:


other test-scenario:

client(Browser, Windows) ----- device(embedded device)

  1. client sends data (~1MB) to server
  2. buffer of server runs full and responds a window size value of 0 to the client
  3. client tries to resend with exponentially backoff time but server responses with window size value of 0
  4. server tells client that new space is available by sending an empty package with window size value of 1436 Bytes.
  5. client continues sending new packages.

:white_check_mark:this is what i expected


  1. My Intuition tells me this is a bug or missing configuration in openwrt.
  2. Sure, i am using socat, but i don't think this is the application which is doing wrong

Any Ideas?

How is OpenWrt involved in this exactly?
Which device?
Which version?

ok, i missed it:

in my scenario i am using this:

device: GL-MT300Nv2
openwrt: OpenWrt 19.07-SNAPSHOT, r10194+113-c53f62b111

At my PC i am using Windows.

The device can take 19.07.2.
And how is it OpenWrt involved in all this?

@trendy i updated the description. In my opinion the stack of openwrt isn't working as expected because i think the stack gets the package with the information that new buffer is available but didn't response with new data. The stack process/sends new data after the backoff-time expired so i don't think this is a bug in the application (can't be sure)

Alright, I want to see if it is reproduced somehow.
Which arguments do you pass to socat? The client is just uploading the file and the server is just receiving it without any special options?
Have you tried it without socat?
Have you tried a different linux router?

Socat:

socat -T 550 TCP6-LISTEN:80,fork,su=nobody TCP6:[fd01:6665::2e0:99ff:feff:1]:80 &> /dev/null &

normally we using socat to forwarding IPv4 to IPv6.


I tested it with a linux machine and got the same results like with the router:

client(Browser, Linux) ----- device(embedded device)

  1. client sends data (~1MB) to server
  2. buffer of server runs full and responds a window size value of 0 to the client
  3. client tries to resend with exponentially backoff time but server responses with window size value of 0
  4. server tells client that new space is available by sending an empty package with window size value of 1436 Bytes.
  5. client ignores the TCP Window Update and waits to continue after the backoff time (server closed already the connection)

So now i think it is a linux problem. I couldn't find anything valid on the internet but it seems that the stack is dropping these TCP Window Update packages when they have the size of 0 (Len = 0). Unfortunally our embedded device closes the connection after 10 sec inactivity.

Some ideas?

Since the same behaviour is noticed in Linux, I think it is expected that OpenWrt will follow.
I don't have any idea, hopefully someone else might be more helpful :slight_smile:

@trendy thanks a lot

1 Like