From: Bert Hubert Date: Thu, 13 Mar 2008 17:18:50 +0000 (+0000) Subject: improve case insensitiveness of CNAME chaining, plus reserve metric for 0x20 mismatching X-Git-Tag: rec-3.1.7.1~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a13208252bdd80b511ca3771f6b5bac9e7520bd;p=thirdparty%2Fpdns.git improve case insensitiveness of CNAME chaining, plus reserve metric for 0x20 mismatching git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1157 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index 8df997d692..58eb3cfa82 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -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); diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 10c326aa87..7010beae0e 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -803,7 +803,7 @@ int SyncRes::doResolveAt(set 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; } diff --git a/pdns/syncres.hh b/pdns/syncres.hh index bc80d89969..5f032eeb38 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -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;