Code Painters
Code Painters

Reputation: 7275

How does Linux TCP stack handle invalid ACK sequence numbers?

I'm just debugging a very strange issue with mobile client getting stuck while downloading a file from my HTTP server. The client is running on a Sierra Wireless Q2687 GSM module.

Each time the transmission hangs after exactly 13480 bytes (10 packets, 1348 worth of payload each). I only see this problem with the GSM module mentioned above, other clients work well.

I've done some Wireshark debugging to note the following:

So, for me it looks like a Sierra Wireless TCP stack off-by-one bug - ACK'ing more data that has actually been received.

Questions:

Upvotes: 0

Views: 1070

Answers (1)

Steffen Ullrich
Steffen Ullrich

Reputation: 123320

can anyone confirm, that ACK'ing with sequence number higher than the highest (received sequence number + length) violates the TCP specification?

If a packet has a FIN flag set then the ACK to the packet will be sequence+1. So it might just be that you've missed this flag. This would also explain that you don't see any more data because FIN means that no more data will follow (i.e. end of connection).

If there was no FIN flag than this would indeed be invalid and I assume that the kernel would simply discard the invalid ACK.

Upvotes: 1

Related Questions