Page MenuHomeFreeBSD

Limit the rate at which we will send ACKs in response to out-of-window ACKs
AbandonedPublic

Authored by jtl on Aug 9 2017, 1:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 22 2023, 9:42 PM
Unknown Object (File)
Dec 13 2023, 8:02 AM
Unknown Object (File)
Nov 15 2023, 12:12 AM
Unknown Object (File)
Aug 15 2023, 9:00 AM
Unknown Object (File)
May 17 2023, 10:01 AM
Unknown Object (File)
Mar 21 2023, 11:35 AM
Unknown Object (File)
Mar 3 2023, 4:09 PM
Unknown Object (File)
Feb 22 2023, 7:10 AM

Details

Reviewers
rrs
Group Reviewers
transport
Summary

When we receive an ACK from a TCP peer and the ACK acknowledges data that we have not sent yet, RFC 793 indicates that we should respond with an ACK indicating our current sequence number and acknowledgment number.

When we receive an ACK for data we have not yet sent, this likely indicates either a spoofed packet or an unsynchronized connection. In the latter case, RFC 793 provides some examples of how sending an ACK can help the remote side determine the connection is unsynchronized, leading it to close the connection. So, it probably makes sense to continue to send ACKs in this case.

However, these ACKs often will *not* be useful. And, in some extreme cases, we can even end up in a cyclical pattern of connections that continually fail at a high rate. Bug 184680 documents one such case which involves sessions opened with a SYN cookie.

Therefore, it makes sense to send these responses, but with a rate limit. This will provide us with the benefit of occasionally helping to quickly clean up an unsynchronized connection, but will also provide some protection against the case where sending a ACK merely feeds a cycle of failing connections (or, in any case, is not helpful).

PR: 184680

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This revision is now accepted and ready to land.Aug 9 2017, 6:36 AM

In case my comment on the bugzilla issue wasn't seen, I tested this patch (manually applied to 10.3), and it worked as expected. Thanks!

This is not a good solution to the problem. See this paper for an explanation of why not.

We will need to create a per-connection limit in order to do this safely.