]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Made linking more nazi, will drop connections that send bad commands
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 20 Dec 2005 15:42:15 +0000 (15:42 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 20 Dec 2005 15:42:15 +0000 (15:42 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2587 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_spanningtree.cpp

index 43737bcfbed1fdd2ec4cef44d061697b3fdb05ba..5df518ab11d46c57f22d02f2c8e7b9600bc2527a 100644 (file)
@@ -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