summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2016-06-05 14:16:36 +0100
committerRussell King <rmk+kernel@armlinux.org.uk>2016-06-05 17:47:56 +0100
commitbd426934cf6175b6ff2f51d3609f22210fdfac34 (patch)
treeaebbe751e591534f548e3b856fa5308c5c8aed33
parent4b33db010a2aa901b52c547a989faf6899aad7d9 (diff)
Add patch from Pie-Man to stop flooding connecting servers with 451 errors
-rw-r--r--src/parse.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c
index bf94a92..447dcd2 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -310,6 +310,18 @@ handle_command(struct Message *mptr, struct Client *client_p,
handler = mptr->handlers[client_p->handler];
+ /* New patch to avoid server flooding from unregistered connects
+ - Pie-Man 07/27/2000 -- while we have hybrid-7 -- rmk*/
+ if (!IsRegistered(client_p))
+ {
+ /* if its from a possible server connection
+ * ignore it.. more than likely its a header thats sneaked through
+ */
+ if ((IsHandshake(client_p) || IsConnecting(client_p) || IsServer(client_p)) &&
+ handler == m_unregistered)
+ return;
+ }
+
/* check right amount of params is passed... --is */
if (i < mptr->args_min)
{