From db720cbee07cd93f2e59f8657cdd4baa1681c8a9 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 14 Apr 2004 18:16:16 +0000 Subject: Link fixes TODO: Add back ip checking! git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@575 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index a4022ef3f..7b4becedf 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -6781,27 +6781,23 @@ void handle_link_packet(char* udp_msg, char* udp_host, serverrec *serv) LinkPort = atoi(Link_Port); if (!strcasecmp(Link_ServerName,servername)) { - if (!strcasecmp(Link_IPAddr,udp_host)) - { - // matching link at this end too, we're all done! - // at this point we must begin key exchange and insert this - // server into our 'active' table. - for (int j = 0; j < 255; j++) { - if (servers[j] != NULL) { - if (!strcasecmp(servers[j]->name,udp_host)) { - strcpy(servers[j]->description,serverdesc); - WriteOpers("Server %s authenticated, exchanging server keys...",servername); - DoSync(serv,udp_host); - return; - } + // matching link at this end too, we're all done! + // at this point we must begin key exchange and insert this + // server into our 'active' table. + for (int j = 0; j < 255; j++) + { + if (servers[j] != NULL) + { + if (!strcasecmp(servers[j]->name,udp_host)) + { + strcpy(servers[j]->description,serverdesc); + WriteOpers("Server %s authenticated, exchanging server keys...",servername); + DoSync(serv,udp_host); + return; } - 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; - } - } - else { - log(DEBUG,"IP Addresses '%s' and '%s' don't match",Link_IPAddr,udp_host); + 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; } } else { -- cgit v1.2.3