From 36f4ce90504494b12b03e389978b7363b9ebc245 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 20 Dec 2005 15:42:15 +0000 Subject: Made linking more nazi, will drop connections that send bad commands git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2587 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 43737bcfb..5df518ab1 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1758,7 +1758,11 @@ class TreeSocket : public InspSocket // replies with theirs if its happy, then if the initiator is happy, // it starts to send its net sync, which starts the merge, otherwise // it sends an ERROR. - if (command == "SERVER") + if (command == "PASS") + { + /* Silently ignored */ + } + else if (command == "SERVER") { return this->Inbound_Server(params); } @@ -1771,6 +1775,11 @@ class TreeSocket : public InspSocket this->WriteLine("ERROR :Client connections to this port are prohibited."); return false; } + else + { + this->WriteLine("ERROR :Invalid command in negotiation phase."); + return false; + } break; case WAIT_AUTH_2: // Waiting for start of other side's netmerge to say they liked our -- cgit v1.2.3