]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
improve case insensitiveness of CNAME chaining, plus reserve metric for 0x20 mismatching
authorBert Hubert <bert.hubert@netherlabs.nl>
Thu, 13 Mar 2008 17:18:50 +0000 (17:18 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Thu, 13 Mar 2008 17:18:50 +0000 (17:18 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1157 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/rec_channel_rec.cc
pdns/syncres.cc
pdns/syncres.hh

index 8df997d6923e380af6e900dfcfb9ad0fda0cf565..58eb3cfa82abdcd91932a57e3cd5d58013c72c78 100644 (file)
@@ -189,6 +189,7 @@ RecursorControlParser::RecursorControlParser()
 
   addGetStat("qa-latency", &g_stats.avgLatencyUsec);
   addGetStat("unexpected-packets", &g_stats.unexpectedCount);
+  addGetStat("case-mismatches", &g_stats.caseMismatchCount);
   addGetStat("spoof-prevents", &g_stats.spoofCount);
 
   addGetStat("nsset-invalidations", &g_stats.nsSetInvalidations);
index 10c326aa8751daa75f771064af4c91e9c6cd7d63..7010beae0e25b8fe6b069557a4b1b34d1c2fd998 100644 (file)
@@ -803,7 +803,7 @@ int SyncRes::doResolveAt(set<string, CIStringCompare> nameservers, string auth,
          replacing_insert(s_negcache, ne);
          negindic=true;
        }
-       else if(i->d_place==DNSResourceRecord::ANSWER && i->qname==qname && i->qtype.getCode()==QType::CNAME && (!(qtype==QType(QType::CNAME)))) {
+       else if(i->d_place==DNSResourceRecord::ANSWER && iequals(i->qname, qname) && i->qtype.getCode()==QType::CNAME && (!(qtype==QType(QType::CNAME)))) {
          ret.push_back(*i);
          newtarget=i->content;
        }
index bc80d89969b264f2d6b972e0ea8215998d4436af..5f032eeb38bff34c3692a298368047702182700f 100644 (file)
@@ -479,6 +479,7 @@ struct RecursorStats
   uint64_t clientParseError;
   uint64_t serverParseError;
   uint64_t unexpectedCount;
+  uint64_t caseMismatchCount;
   uint64_t spoofCount;
   uint64_t resourceLimits;
   uint64_t ipv6queries;