]> granicus.if.org Git - pdns/commitdiff
no longer log response packets with an empty domain name - pretty common
authorBert Hubert <bert.hubert@netherlabs.nl>
Thu, 7 Jan 2010 11:55:53 +0000 (11:55 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Thu, 7 Jan 2010 11:55:53 +0000 (11:55 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1492 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/lwres.cc

index 0a799cd08952e628350f3cd19b3c65c8498145e6..23099e7f3422a95a92a0f1dba67a32332717ace8 100644 (file)
@@ -1,6 +1,6 @@
 /*
     PowerDNS Versatile Database Driven Nameserver
-    Copyright (C) 2002 - 2009 PowerDNS.COM BV
+    Copyright (C) 2002 - 2010 PowerDNS.COM BV
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License version 2 as 
@@ -174,10 +174,10 @@ int asyncresolve(const ComboAddress& ip, const string& domain, int type, bool do
     }
 
     if(!pdns_iequals(domain, mdp.d_qname)) { 
-      if(domain.find((char)0)==string::npos) {// embedded nulls are too noisy
+      if(!mdp.d_qname.empty() && domain.find((char)0) == string::npos) {// embedded nulls are too noisy, plus empty domains are too
         L<<Logger::Notice<<"Packet purporting to come from remote server "<<ip.toString()<<" contained wrong answer: '" << domain << "' != '" << mdp.d_qname << "'" << endl;
-        g_stats.unexpectedCount++;
       }
+      g_stats.unexpectedCount++;
       goto out;
     }