From: Remi Gacogne Date: Tue, 13 Jun 2017 13:16:14 +0000 (+0200) Subject: rec: Don't go Bogus on NXDomain while getting DS X-Git-Tag: rec-4.1.0-alpha1~50^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82fbd934f652f9a50a09e65a1850133e604eabcd;p=thirdparty%2Fpdns.git rec: Don't go Bogus on NXDomain while getting DS --- diff --git a/pdns/recursordist/test-syncres_cc.cc b/pdns/recursordist/test-syncres_cc.cc index 8c2190d6e7..20553fd369 100644 --- a/pdns/recursordist/test-syncres_cc.cc +++ b/pdns/recursordist/test-syncres_cc.cc @@ -300,7 +300,7 @@ static void addRRSIG(const testkeysset_t& keys, std::vector& records, } RRSIGRecordContent rrc; - computeRRSIG(it->second.first, signer, wildcard ? * wildcard : records[recordsCount-1].d_name, records[recordsCount-1].d_type, records[recordsCount-1].d_ttl, sigValidity, rrc, recordcontents, algo); + computeRRSIG(it->second.first, signer, wildcard ? *wildcard : records[recordsCount-1].d_name, records[recordsCount-1].d_type, records[recordsCount-1].d_ttl, sigValidity, rrc, recordcontents, algo); if (broken) { rrc.d_signature[0] ^= 42; } diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 5b03fcd1ca..07957a3f78 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -1345,7 +1345,7 @@ vState SyncRes::getDSRecords(const DNSName& zone, dsmap_t& ds, bool taOnly, unsi d_skipCNAMECheck = oldSkipCNAME; d_requireAuthData = oldRequireAuthData; - if (rcode == RCode::NoError) { + if (rcode == RCode::NoError || rcode == RCode::NXDomain) { if (state == Secure) { for (const auto& record : dsrecords) { if (record.d_type == QType::DS) { @@ -1543,6 +1543,10 @@ vState SyncRes::validateDNSKeys(const DNSName& zone, const std::vectorsecond.records.empty()) // this happens when we did store signatures, but passed on the records themselves continue; -// vState recordState = state; vState recordState = getValidationStatus(auth); - LOG(d_prefix<<"Got status "<first.name<first.name<