diff options.h @ 277:044bc108b9b3

* Per-IP connection unauthed connection limits * m_close() exits fatally on failure * other cleanups
author Matt Johnston <matt@ucc.asn.au>
date Wed, 08 Mar 2006 12:41:27 +0000
parents e37b160c414c
children b72f98803e46
line wrap: on
line diff
--- a/options.h	Fri Dec 09 06:10:27 2005 +0000
+++ b/options.h	Wed Mar 08 12:41:27 2006 +0000
@@ -161,6 +161,13 @@
 
 /* Specify the number of clients we will allow to be connected but
  * not yet authenticated. After this limit, connections are rejected */
+/* The first setting is per-IP, to avoid denial of service */
+#ifndef MAX_UNAUTH_PER_IP
+#define MAX_UNAUTH_PER_IP 5
+#endif
+
+/* And then a global limit to avoid chewing memory if connections 
+ * come from many IPs */
 #ifndef MAX_UNAUTH_CLIENTS
 #define MAX_UNAUTH_CLIENTS 30
 #endif