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)
while (!sr) {
try {
- sr=loadRPZFromServer(master, zoneName, zone, defpol, maxTTL, tt, maxReceivedBytes, localAddress);
- if(refresh) {
- sr->d_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);
}
}
if (!sr) {
- sleep(refresh);
+ if (refresh == 0) {
+ sleep(10);
+ } else {
+ sleep(refresh);
+ }
}
}