From: Remi Gacogne Date: Wed, 1 Jul 2020 14:05:56 +0000 (+0200) Subject: rec: Refuse QType 0 right away, based on rfc6895 section 3.1 X-Git-Tag: rec-4.4.0-alpha2~17^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e72c28de80b81d09c20fcf12b0cb9b2cf2761c3e;p=thirdparty%2Fpdns.git rec: Refuse QType 0 right away, based on rfc6895 section 3.1 --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 19eaa418a4..e71b7879de 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -145,7 +145,7 @@ int SyncRes::beginResolve(const DNSName &qname, const QType &qtype, uint16_t qcl auto qtypeCode = qtype.getCode(); /* rfc6895 section 3.1 */ - if ((qtypeCode >= 128 && qtypeCode <= 254) || qtypeCode == QType::RRSIG || qtypeCode == QType::NSEC3 || qtypeCode == QType::OPT || qtypeCode == 65535) { + if (qtypeCode == 0 || (qtypeCode >= 128 && qtypeCode <= 254) || qtypeCode == QType::RRSIG || qtypeCode == QType::NSEC3 || qtypeCode == QType::OPT || qtypeCode == 65535) { return -1; }