From: brain Date: Tue, 20 Dec 2005 15:42:15 +0000 (+0000) Subject: Made linking more nazi, will drop connections that send bad commands X-Git-Tag: v2.0.23~9487 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=36f4ce90504494b12b03e389978b7363b9ebc245;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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