From: Bertrand Jacquin Date: Wed, 16 Oct 2024 20:43:07 +0000 (+0100) Subject: pdns: allow empty string in version-string X-Git-Tag: rec-5.2.0-alpha1~25^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfc46d7c51c4df20919be94bd261020ed099c9bd;p=thirdparty%2Fpdns.git pdns: allow empty string in version-string 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. --- diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index d06e4724e1..94d729e75e 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -288,7 +288,7 @@ int PacketHandler::doChaosRequest(const DNSPacket& p, std::unique_ptr // 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/";