diff options
author | Gerrit Renker <gerrit@erg.abdn.ac.uk> | 2007-09-26 10:31:49 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-10 19:52:43 -0400 |
commit | a94f0f970549e63e54c80c4509db299c514d8c11 (patch) | |
tree | 3b9421fc70e00c16ed57ef4330b24504b04ae309 /Documentation/networking/dccp.txt | |
parent | ee1a15922d356aff0e31bf9bb9088ab346b8033a (diff) |
[DCCP]: Rate-limit DCCP-Syncs
This implements a SHOULD from RFC 4340, 7.5.4:
"To protect against denial-of-service attacks, DCCP implementations SHOULD
impose a rate limit on DCCP-Syncs sent in response to sequence-invalid packets,
such as not more than eight DCCP-Syncs per second."
The rate-limit is maintained on a per-socket basis. This is a more stringent
policy than enforcing the rate-limit on a per-source-address basis and
protects against attacks with forged source addresses.
Moreover, the mechanism is deliberately kept simple. In contrast to
xrlim_allow(), bursts of Sync packets in reply to sequence-invalid packets
are not supported. This foils such attacks where the receipt of a Sync
triggers further sequence-invalid packets. (I have tested this mechanism against
xrlim_allow algorithm for Syncs, permitting bursts just increases the problems.)
In order to keep flexibility, the timeout parameter can be set via sysctl; and
the whole mechanism can even be disabled (which is however not recommended).
The algorithm in this patch has been improved with regard to wrapping issues
thanks to a suggestion by Arnaldo.
Commiter note: Rate limited the step 6 DCCP_WARN too, as it says we're
sending a sync.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Diffstat (limited to 'Documentation/networking/dccp.txt')
-rw-r--r-- | Documentation/networking/dccp.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index 4504cc59e405..477026ae0ffb 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -112,6 +112,11 @@ tx_qlen = 5 | |||
112 | The size of the transmit buffer in packets. A value of 0 corresponds | 112 | The size of the transmit buffer in packets. A value of 0 corresponds |
113 | to an unbounded transmit buffer. | 113 | to an unbounded transmit buffer. |
114 | 114 | ||
115 | sync_ratelimit = 125 ms | ||
116 | The timeout between subsequent DCCP-Sync packets sent in response to | ||
117 | sequence-invalid packets on the same socket (RFC 4340, 7.5.4). The unit | ||
118 | of this parameter is milliseconds; a value of 0 disables rate-limiting. | ||
119 | |||
115 | Notes | 120 | Notes |
116 | ===== | 121 | ===== |
117 | 122 | ||