From: Peter Thomassen Date: Mon, 15 Apr 2024 14:58:46 +0000 (+0200) Subject: auth: add SIGNALING-ZONE metadata setting X-Git-Tag: rec-5.4.0-alpha0~21^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b225f077702a397e88af553e571e0bd51fb36bc;p=thirdparty%2Fpdns.git auth: add SIGNALING-ZONE metadata setting --- diff --git a/pdns/dbdnsseckeeper.cc b/pdns/dbdnsseckeeper.cc index f2c7f2c216..ed5e08e626 100644 --- a/pdns/dbdnsseckeeper.cc +++ b/pdns/dbdnsseckeeper.cc @@ -85,6 +85,17 @@ bool DNSSECKeeper::isPresigned(const ZoneName& name, bool useCache) return meta=="1"; } +bool DNSSECKeeper::isSignalingZone(const ZoneName& name, bool useCache) +{ + string meta; + if (useCache) { + getFromMeta(name, "SIGNALING-ZONE", meta); + } + else { + getFromMetaNoCache(name, "SIGNALING-ZONE", meta); + } + return meta=="1"; +} bool DNSSECKeeper::addKey(const ZoneName& name, bool setSEPBit, int algorithm, int64_t& keyId, int bits, bool active, bool published) { diff --git a/pdns/dnsseckeeper.hh b/pdns/dnsseckeeper.hh index 7b5614f792..f0ee85bbb7 100644 --- a/pdns/dnsseckeeper.hh +++ b/pdns/dnsseckeeper.hh @@ -213,6 +213,7 @@ public: bool isPresigned(const ZoneName& zname, bool useCache=true); bool setPresigned(const ZoneName& zname); bool unsetPresigned(const ZoneName& zname); + bool isSignalingZone(const ZoneName& zname, bool useCache=true); bool setPublishCDNSKEY(const ZoneName& zname, bool deleteAlg); void getPublishCDNSKEY(const ZoneName& zname, std::string& value); bool unsetPublishCDNSKEY(const ZoneName& zname); diff --git a/pdns/packethandler.cc b/pdns/packethandler.cc index 518b10e523..733b05fdb0 100644 --- a/pdns/packethandler.cc +++ b/pdns/packethandler.cc @@ -1342,6 +1342,9 @@ void PacketHandler::completeANYRecords(DNSPacket& p, std::unique_ptr& bool PacketHandler::tryAuthSignal(DNSPacket& p, std::unique_ptr& r, DNSName &target) { DLOG(g_log<