diff options
-rw-r--r-- | src/coremods/core_dns.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index de8dedd4a..61d524ada 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -571,6 +571,15 @@ class MyManager : public Manager, public Timer, public EventHandler if (length < Packet::HEADER_LENGTH) return; + if (myserver != from) + { + std::string server1 = from.str(); + std::string server2 = myserver.str(); + ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Got a result from the wrong server! Bad NAT or DNS forging attempt? '%s' != '%s'", + server1.c_str(), server2.c_str()); + return; + } + Packet recv_packet; try @@ -583,15 +592,6 @@ class MyManager : public Manager, public Timer, public EventHandler return; } - if (myserver != from) - { - std::string server1 = from.str(); - std::string server2 = myserver.str(); - ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Got a result from the wrong server! Bad NAT or DNS forging attempt? '%s' != '%s'", - server1.c_str(), server2.c_str()); - return; - } - DNS::Request* request = this->requests[recv_packet.id]; if (request == NULL) { |