From: Otto Moerbeek Date: Fri, 5 Apr 2024 11:39:41 +0000 (+0200) Subject: rec: a name can be present already when building the cname chain X-Git-Tag: rec-5.1.0-alpha1~32^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d8ffee604fce5e933a0c5d66d17abcb7269c677;p=thirdparty%2Fpdns.git rec: a name can be present already when building the cname chain --- diff --git a/pdns/recursordist/syncres.cc b/pdns/recursordist/syncres.cc index 282944f544..e87206292c 100644 --- a/pdns/recursordist/syncres.cc +++ b/pdns/recursordist/syncres.cc @@ -4395,7 +4395,10 @@ RCode::rcodes_ SyncRes::updateCacheFromRecords(unsigned int depth, const string& break; } initial = cnameIt->second; - wildcardCandidates.emplace(initial, false); + if (!wildcardCandidates.emplace(initial, false).second) { + // CNAME Loop + break; + } } }