From: Bert Hubert Date: Thu, 13 Mar 2008 17:17:50 +0000 (+0000) Subject: improve case-insensitivity of label compression X-Git-Tag: rec-3.1.7.1~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac1db50a7cf4fdb539e6792c5098c0590773a10b;p=thirdparty%2Fpdns.git improve case-insensitivity of label compression git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1156 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dnswriter.cc b/pdns/dnswriter.cc index 278c2ba057..5a7437e0a4 100644 --- a/pdns/dnswriter.cc +++ b/pdns/dnswriter.cc @@ -67,7 +67,7 @@ void DNSPacketWriter::startRecord(const string& name, uint16_t qtype, uint32_t t d_stuff = 0; d_rollbackmarker=d_content.size(); - if(d_qname == d_recordqname) { // don't do the whole label compression thing if we *know* we can get away with "see question" + if(iequals(d_qname,d_recordqname)) { // don't do the whole label compression thing if we *know* we can get away with "see question" static char marker[2]={0xc0, 0x0c}; d_content.insert(d_content.end(), &marker[0], &marker[2]); } @@ -153,7 +153,7 @@ DNSPacketWriter::lmap_t::iterator find(DNSPacketWriter::lmap_t& lmap, const stri { DNSPacketWriter::lmap_t::iterator ret; for(ret=lmap.begin(); ret != lmap.end(); ++ret) - if(ret->first == label) + if(iequals(ret->first,label)) break; return ret; }