]> git.ipfire.org Git - thirdparty/squid.git/commit - src/structs.h
Add client_ip_max_connections
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 2 Jan 2010 04:32:46 +0000 (17:32 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 2 Jan 2010 04:32:46 +0000 (17:32 +1300)
commitab2ecb0ef760ba76471199c3f1b234ea6545659b
treea840d5aacb05e3c2bf7713c336c713645fc944f9
parent84f795a52b72982329097ed8ae096b7cb76a3b8a
Add client_ip_max_connections

Given some incentive after deep consideration of the slowloris claims.
While I still do not believe Squid is vulnerable per-se and some people
have tested and found no such failures as claimed for the DoS attack.

We found we could provide better administrative controls.  This is one such
that has been asked about many times and still did not exist. It operates
essentially teh same as the maxconn ACL, but does not require HTTP headers
and other request data to fully exist like ACLs do.

It is tested immediately after accept() and is request type agnostic, right
down to DNS TCP requests. So care is warranted in hierarchy situations or where
clients may be behind NAT.

Utilizes the client DB to monitor accepted TCP links. Operates prior to
everything so as to eliminate resource usage on the blocking case and
close the windows of opportunity for dribble-attacks etc.

Default (-1) is to keep the status-quo of no limits.
src/cf.data.pre
src/comm.cc
src/structs.h