From f72964d7bff8b39185cdf05652bdc9f2ced0e8cf Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 15 Apr 2004 12:07:02 +0000 Subject: Mesh authcookie fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@604 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index dcab93c1e..6eb01466a 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -6618,6 +6618,25 @@ 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); + } + } + } + WriteOpers("\2WARNING!\2 %s sent us an authentication packet but we are not authenticating with this server right noe! Possible intrusion attempt!",udp_host); + return; + } + + return; } } -- cgit v1.2.3