From: Remi Gacogne Date: Tue, 28 Sep 2021 09:12:23 +0000 (+0200) Subject: rec: Use the correct RPZ policy name when loading via XFR X-Git-Tag: rec-4.5.6~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10803%2Fhead;p=thirdparty%2Fpdns.git rec: Use the correct RPZ policy name when loading via XFR 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) --- diff --git a/pdns/rpzloader.cc b/pdns/rpzloader.cc index 1d702f09cc..262c12091c 100644 --- a/pdns/rpzloader.cc +++ b/pdns/rpzloader.cc @@ -366,7 +366,7 @@ void RPZIXFRTracker(const std::vector& masters, boost::optionalgetRefresh(), 10U); 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 */