From: Pieter Lexis Date: Wed, 21 Feb 2018 16:37:02 +0000 (+0100) Subject: rec: Ensure we don't hammer the RPZ master server X-Git-Tag: rec-4.1.2~4^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F6336%2Fhead;p=thirdparty%2Fpdns.git rec: Ensure we don't hammer the RPZ master server Before, if the `refresh` was not set in the lua-config file's `rpzMaster` statement, we would keep trying to get delta's the whole time. This commit ensures we update the zone's refresh config to the value from the AXFR'd zone (if not set in the config). (cherry picked from commit 2c68abe75d908b4a32a7de229c75af137dc3ec5a) --- diff --git a/pdns/reczones.cc b/pdns/reczones.cc index fd42fe9b9e..918a870d97 100644 --- a/pdns/reczones.cc +++ b/pdns/reczones.cc @@ -326,9 +326,9 @@ void RPZIXFRTracker(const ComboAddress& master, boost::optionald_st.refresh=refresh; + sr=loadRPZFromServer(master, zoneName, zone, defpol, maxTTL, tt, maxReceivedBytes, localAddress, axfrTimeout); + if(refresh == 0) { + refresh = sr->d_st.refresh; } zone->setSerial(sr->d_st.serial); } @@ -340,7 +340,11 @@ void RPZIXFRTracker(const ComboAddress& master, boost::optional