From: Otto Moerbeek Date: Wed, 23 Feb 2022 09:18:48 +0000 (+0100) Subject: Make sure rec does not know ALIAS and LUA X-Git-Tag: rec-4.7.0-alpha1~3^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0abfc310b16fc4736fac5eb058dd7271e8770af6;p=thirdparty%2Fpdns.git Make sure rec does not know ALIAS and LUA --- diff --git a/pdns/dnsrecords.cc b/pdns/dnsrecords.cc index f9379e3a39..4f581cbc03 100644 --- a/pdns/dnsrecords.cc +++ b/pdns/dnsrecords.cc @@ -140,7 +140,9 @@ boilerplate_conv(AAAA, conv.xfrIP6(d_ip6); ); boilerplate_conv(NS, conv.xfrName(d_content, true)); boilerplate_conv(PTR, conv.xfrName(d_content, true)); boilerplate_conv(CNAME, conv.xfrName(d_content, true)); +#if !defined(RECURSOR) boilerplate_conv(ALIAS, conv.xfrName(d_content, false)); +#endif boilerplate_conv(DNAME, conv.xfrName(d_content)); boilerplate_conv(MB, conv.xfrName(d_madname, true)); boilerplate_conv(MG, conv.xfrName(d_mgmname, true)); @@ -930,7 +932,9 @@ void reportOtherTypes() MRRecordContent::report(); AFSDBRecordContent::report(); DNAMERecordContent::report(); +#if !defined(RECURSOR) ALIASRecordContent::report(); +#endif SPFRecordContent::report(); NAPTRRecordContent::report(); KXRecordContent::report(); diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index e587edf68a..3dc3efae42 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -266,6 +266,7 @@ private: DNSName d_content; }; +#if !defined(RECURSOR) class ALIASRecordContent : public DNSRecordContent { public: @@ -273,7 +274,7 @@ public: DNSName d_content; }; - +#endif class DNAMERecordContent : public DNSRecordContent { diff --git a/pdns/qtype.cc b/pdns/qtype.cc index 3a6a7fa86e..53d05c0edb 100644 --- a/pdns/qtype.cc +++ b/pdns/qtype.cc @@ -94,8 +94,10 @@ const map QType::names = { {"CAA", 257}, {"DLV", 32769}, {"ADDR", 65400}, +#if !defined(RECURSOR) {"ALIAS", 65401}, {"LUA", 65402}, +#endif }; static map swapElements(const map& names) { diff --git a/pdns/qtype.hh b/pdns/qtype.hh index f1d4baa3b6..795b295c23 100644 --- a/pdns/qtype.hh +++ b/pdns/qtype.hh @@ -20,6 +20,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "namespaces.hh" /** The QType class is meant to deal easily with the different kind of resource types, like 'A', 'NS', @@ -57,7 +61,7 @@ public: bool isMetadataType() const; static uint16_t chartocode(const char* p); - + enum typeenum : uint16_t { ENT = 0, A = 1, @@ -123,8 +127,10 @@ public: CAA = 257, DLV = 32769, ADDR = 65400, +#if !defined(RECURSOR) ALIAS = 65401, LUA = 65402 +#endif }; const static map names;