]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #5765 from pieterlexis/rec-40-lowercase-outgoing-all-the-things
authorPieter Lexis <pieterlexis@users.noreply.github.com>
Mon, 16 Oct 2017 15:56:15 +0000 (17:56 +0200)
committerGitHub <noreply@github.com>
Mon, 16 Oct 2017 15:56:15 +0000 (17:56 +0200)
Backport #5740: Lowercase all outgoing qnames when lowercase-outgoing is set

1  2 
pdns/syncres.cc
pdns/syncres.hh

diff --cc pdns/syncres.cc
index 993db5e8f939cd138f62b5688582f2d01efa1785,88e04f646e26480c0373a6fe6078593819427534..6e713ef6a94c3da520b8a08361fa7a33590b478e
@@@ -369,15 -369,16 +369,19 @@@ int SyncRes::asyncresolveWrapper(const 
      
      if(mode==EDNSStatus::NOEDNS) {
        g_stats.noEdnsOutQueries++;
 +      if (wantsEDNS) {
 +        LOG("Remote " + ip.toString() + " does not support EDNS!");
 +      }
        EDNSLevel = 0; // level != mode
      }
 -    else if(ednsMANDATORY || mode==EDNSStatus::UNKNOWN || mode==EDNSStatus::EDNSOK || mode==EDNSStatus::EDNSIGNORANT)
 +    else if(mode==EDNSStatus::UNKNOWN || mode==EDNSStatus::EDNSOK || mode==EDNSStatus::EDNSIGNORANT)
        EDNSLevel = 1;
      
-     ret=asyncresolve(ip, domain, type, doTCP, sendRDQuery, EDNSLevel, now, srcmask, ctx, luaconfsLocal->outgoingProtobufServer, res);
+     DNSName sendQname(domain);
+     if (g_lowercaseOutgoing)
+       sendQname = sendQname.makeLowerCase();
+     ret=asyncresolve(ip, sendQname, type, doTCP, sendRDQuery, EDNSLevel, now, srcmask, ctx, luaconfsLocal->outgoingProtobufServer, res);
      if(ret < 0) {
        return ret; // transport error, nothing to learn here
      }
diff --cc pdns/syncres.hh
Simple merge