From: Ruben d'Arco Date: Mon, 3 Dec 2012 04:12:57 +0000 (+0100) Subject: Add QClass NONE and ANY X-Git-Tag: rec-3.6.0-rc1~556^2~3^2~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6f3feee22cfdf0874b5b4dba1095f36f9d1a6ac;p=thirdparty%2Fpdns.git Add QClass NONE and ANY RFC2136 uses NONE and ANY to check what type of operation to perform. So, these QClasses are now added and registered as valid records. --- diff --git a/pdns/dnsrecords.hh b/pdns/dnsrecords.hh index b9020a61b8..7780289d00 100644 --- a/pdns/dnsrecords.hh +++ b/pdns/dnsrecords.hh @@ -553,10 +553,12 @@ void RNAME##RecordContent::toPacket(DNSPacketWriter& pw) void RNAME##RecordContent::report(void) \ { \ regist(1, RTYPE, &RNAME##RecordContent::make, &RNAME##RecordContent::make, #RNAME); \ + regist(254, RTYPE, &RNAME##RecordContent::make, &RNAME##RecordContent::make, #RNAME); \ } \ void RNAME##RecordContent::unreport(void) \ { \ unregist(1, RTYPE); \ + unregist(254, RTYPE); \ } \ \ RNAME##RecordContent::RNAME##RecordContent(const string& zoneData) : DNSRecordContent(RTYPE) \ diff --git a/pdns/qtype.hh b/pdns/qtype.hh index 42729128d3..0a4a256b31 100644 --- a/pdns/qtype.hh +++ b/pdns/qtype.hh @@ -166,6 +166,6 @@ private: struct QClass { - enum QClassEnum {IN=1, CHAOS=3}; + enum QClassEnum {IN=1, CHAOS=3, NONE=254, ANY=255}; }; #endif diff --git a/pdns/sillyrecords.cc b/pdns/sillyrecords.cc index 8c0e139eea..d3806075d9 100644 --- a/pdns/sillyrecords.cc +++ b/pdns/sillyrecords.cc @@ -150,6 +150,7 @@ latlon2ul(const char **latlonstrptr, int *which) void LOCRecordContent::report(void) { regist(1, ns_t_loc, &make, &make, "LOC"); + regist(254, ns_t_loc, &make, &make, "LOC"); } DNSRecordContent* LOCRecordContent::make(const string& content)