]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdns: allow empty string in version-string 14781/head
authorBertrand Jacquin <bertrand@jacquin.bzh>
Wed, 16 Oct 2024 20:43:07 +0000 (21:43 +0100)
committerBertrand Jacquin <bertrand@jacquin.bzh>
Wed, 16 Oct 2024 20:55:12 +0000 (21:55 +0100)
This change allow an empty string to be returned to CHAOS version.bind
request. version-string by default is set to "full" through
pdns/auth-main.cc declareArguments(), however does not allow an empty
string to be returned as PowerDNS Recursor does.

pdns/packethandler.cc

index d06e4724e127e8c153a22a5ec706e71affb02399..94d729e75ebdc9ae0fba71e3342386f5e7263eb2 100644 (file)
@@ -288,7 +288,7 @@ int PacketHandler::doChaosRequest(const DNSPacket& p, std::unique_ptr<DNSPacket>
       // modes: full, powerdns only, anonymous or custom
       const static string mode=::arg()["version-string"];
       string content;
-      if(mode.empty() || mode=="full")
+      if(mode=="full")
         content=fullVersionString();
       else if(mode=="powerdns")
         content="Served by PowerDNS - https://www.powerdns.com/";