]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: Use the correct RPZ policy name when loading via XFR 10802/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 28 Sep 2021 09:12:23 +0000 (11:12 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Wed, 6 Oct 2021 06:51:06 +0000 (08:51 +0200)
This commit fixes two issues:
- if the existing zone name is not empty we should use it, instead of
  the zone domain
- if the zone domain has to be used, it should not include a final dot

(cherry picked from commit 3e86a970828dda814a140c9613311a8507c3c458)

pdns/rpzloader.cc

index 7f6a78cdcaae0ad9aecfa6a635f2c38500378f8c..c28aba62768b5152da43b2060da4825f4aecc4e5 100644 (file)
@@ -365,7 +365,7 @@ void RPZIXFRTracker(const std::vector<ComboAddress>& masters, boost::optional<DN
 
   time_t refresh;
   DNSName zoneName = oldZone->getDomain();
-  std::string polName = oldZone->getName().empty() ? oldZone->getName() : zoneName.toString();
+  std::string polName = !oldZone->getName().empty() ? oldZone->getName() : zoneName.toStringNoDot();
 
   while (!sr) {
     /* if we received an empty sr, the zone was not really preloaded */