From: Otto Moerbeek Date: Fri, 31 Jul 2020 10:12:49 +0000 (+0200) Subject: Merge pull request #9196 from pieterlexis/qla-only-v6 X-Git-Tag: rec-4.4.0-beta1~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ccc02b2271ba3da471e38fce2ad0ebd0eee91149;p=thirdparty%2Fpdns.git Merge pull request #9196 from pieterlexis/qla-only-v6 rec: Disable outgoing v4 when QLA has no v4 addresses --- ccc02b2271ba3da471e38fce2ad0ebd0eee91149 diff --cc pdns/reczones.cc index b0a99480f2,f57be640d2..5bb6312aea --- a/pdns/reczones.cc +++ b/pdns/reczones.cc @@@ -42,10 -42,10 +42,10 @@@ static void insertIntoRootNSZones(cons } } - void primeHints(void) + bool primeHints(void) { // prime root cache - const vState validationState = Insecure; + const vState validationState = vState::Insecure; vector nsset; t_rootNSZones.clear(); diff --cc pdns/syncres.cc index b84cafde99,fe40aeea4b..bd037f056e --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@@ -931,10 -932,10 +932,10 @@@ vector SyncRes::getAddrs( d_DNSSECValidationRequested = false; try { - vState newState = Indeterminate; + vState newState = vState::Indeterminate; res_t resv4; // If IPv4 ever becomes second class, we should revisit this - if (doResolve(qname, QType::A, resv4, depth+1, beenthere, newState) == 0) { // this consults cache, OR goes out + if (s_doIPv4 && doResolve(qname, QType::A, resv4, depth+1, beenthere, newState) == 0) { // this consults cache, OR goes out for (auto const &i : resv4) { if (i.d_type == QType::A) { if (auto rec = getRR(i)) { @@@ -943,10 -944,10 +944,10 @@@ } } } - if (s_doIPv6) { + if (s_doIPv6) { // s_doIPv6 **IMPLIES** pdns::isQueryLocalAddressFamilyEnabled(AF_INET6) returned true if (ret.empty()) { // We did not find IPv4 addresses, try to get IPv6 ones - newState = Indeterminate; + newState = vState::Indeterminate; res_t resv6; if (doResolve(qname, QType::AAAA, resv6, depth+1, beenthere, newState) == 0) { // this consults cache, OR goes out for (const auto &i : resv6) {