From cfc46d7c51c4df20919be94bd261020ed099c9bd Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Wed, 16 Oct 2024 21:43:07 +0100 Subject: [PATCH] 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. --- pdns/packethandler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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/"; -- 2.47.2