From: Remi Gacogne Date: Wed, 23 Jun 2021 08:54:05 +0000 (+0200) Subject: rec: Check that we get the SOA on a direct query for a non-existing DS X-Git-Tag: dnsdist-1.7.0-alpha1~128^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb02e1a082a61c9ab125965db3434cf0123421a7;p=thirdparty%2Fpdns.git rec: Check that we get the SOA on a direct query for a non-existing DS --- diff --git a/pdns/recursordist/test-syncres_cc7.cc b/pdns/recursordist/test-syncres_cc7.cc index 1b5c70d73d..7d4484175f 100644 --- a/pdns/recursordist/test-syncres_cc7.cc +++ b/pdns/recursordist/test-syncres_cc7.cc @@ -244,6 +244,23 @@ BOOST_AUTO_TEST_CASE(test_dnssec_secure_to_insecure_nodata) BOOST_CHECK_EQUAL(sr->getValidationState(), vState::Insecure); BOOST_REQUIRE_EQUAL(ret.size(), 1U); BOOST_CHECK_EQUAL(queriesCount, 5U); + + /* Request the DS for powerdns.com, which does not exist. We should get + the denial proof AND the SOA */ + ret.clear(); + res = sr->beginResolve(target, QType(QType::DS), QClass::IN, ret); + BOOST_CHECK_EQUAL(res, RCode::NoError); + BOOST_CHECK_EQUAL(sr->getValidationState(), vState::Secure); + BOOST_REQUIRE_EQUAL(ret.size(), 4U); + bool soaFound = false; + for (const auto& record : ret) { + if (record.d_type == QType::SOA) { + soaFound = true; + break; + } + } + BOOST_CHECK_EQUAL(soaFound, true); + BOOST_CHECK_EQUAL(queriesCount, 6U); } BOOST_AUTO_TEST_CASE(test_dnssec_secure_to_insecure_cname)