]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/inspircd.cpp
Mesh tweaks (wasnt sending the ip in the + packet)
[user/henk/code/inspircd.git] / src / inspircd.cpp
index dcab93c1e87fbdf907182b08b36a9f53b883209e..ca587b58d328649c0a7ff052deac6de4a2784ccc 100644 (file)
@@ -6618,6 +6618,26 @@ void handle_link_packet(char* udp_msg, char* udp_host, serverrec *serv)
                        if (auth_cookies[u] == atoi(cookie))
                        {
                                WriteOpers("Allowed cookie from %s, is now part of the mesh",servername);
+
+
+                               for (int j = 0; j < 32; j++)
+                               {
+                                       if (me[j] != NULL)
+                                       {
+                                               for (int k = 0; k < me[j]->connectors.size(); k++)
+                                               {
+                                                       if (!strcasecmp(me[j]->connectors[k].GetServerName().c_str(),udp_host))
+                                                       {
+                                                               me[j]->connectors[k].SetServerName(servername);
+                                                               return;
+                                                       }
+                                               }
+                                       }
+                                       WriteOpers("\2WARNING!\2 %s sent us an authentication packet but we are not authenticating with this server right now! Possible intrusion attempt!",udp_host);
+                                       return;
+                               }
+
+
                                return;
                        }
                }