]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: a name can be present already when building the cname chain
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 5 Apr 2024 11:39:41 +0000 (13:39 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 5 Apr 2024 11:39:41 +0000 (13:39 +0200)
pdns/recursordist/syncres.cc

index 282944f54453634e25717f32fa52c681fd5e977a..e87206292ccce014244eefc7bf380472784d23ee 100644 (file)
@@ -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;
+      }
     }
   }