From: Remi Gacogne Date: Tue, 13 Jul 2021 12:55:47 +0000 (+0200) Subject: rec: Fix the NSEC3 ancestor check for DS in the aggressive cache X-Git-Tag: dnsdist-1.7.0-alpha1~83^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1eed7f4572d396b544756cf93be2297db23483b3;p=thirdparty%2Fpdns.git rec: Fix the NSEC3 ancestor check for DS in the aggressive cache --- diff --git a/pdns/recursordist/aggressive_nsec.cc b/pdns/recursordist/aggressive_nsec.cc index 370750d403..41b095cf26 100644 --- a/pdns/recursordist/aggressive_nsec.cc +++ b/pdns/recursordist/aggressive_nsec.cc @@ -545,6 +545,8 @@ bool AggressiveNSECCache::getNSEC3Denial(time_t now, std::shared_ptrbeginResolve(DNSName("4.sub.powerdns.com"), QType(QType::A), QClass::IN, ret); + res = sr->beginResolve(DNSName("4.sub.powerdns.com"), QType(QType::DS), QClass::IN, ret); BOOST_CHECK_EQUAL(res, RCode::NoError); BOOST_CHECK_EQUAL(sr->getValidationState(), vState::Insecure); BOOST_REQUIRE_EQUAL(ret.size(), 1U); @@ -918,7 +918,7 @@ BOOST_AUTO_TEST_CASE(test_aggressive_nsec3_ancestor) /* now we query other2.sub.powerdns.com, we should NOT be able to use the NSEC3s we have to prove that the name does not exist */ ret.clear(); - res = sr->beginResolve(DNSName("4.sub.powerdns.com"), QType(QType::A), QClass::IN, ret); + res = sr->beginResolve(DNSName("4.sub.powerdns.com"), QType(QType::DS), QClass::IN, ret); BOOST_CHECK_EQUAL(res, RCode::NoError); BOOST_CHECK_EQUAL(sr->getValidationState(), vState::Insecure); BOOST_REQUIRE_EQUAL(ret.size(), 1U);