last_stat=time(0);
}
- if(now.tv_sec - last_secpoll >= 1800) {
+ if(now.tv_sec - last_secpoll >= 3600) {
doSecPoll(&last_secpoll);
}
}
-
-
}
catch(PDNSException& ae)
{
- L<<Logger::Error<<"Fatal error: "<<ae.reason<<endl;
+ L<<Logger::Error<<"Fatal error in housekeeping thread: "<<ae.reason<<endl;
throw;
}
-;
void makeThreadPipes()
{
string query = "recursor-" PACKAGEVERSION ".security-status."+::arg()["security-poll-suffix"];
+ if(*query.rbegin()!='.')
+ query+='.';
+
+ boost::replace_all(query, "+", "_");
+
int res=sr.beginResolve(query, QType(QType::TXT), 1, ret);
if(!res && !ret.empty()) {
string content=ret.begin()->content;
}
else {
L<<Logger::Warning<<"Could not retrieve security status update for '" PACKAGEVERSION "' on '"+query+"', RCODE = "<< RCode::to_s(res)<<endl;
- if(g_security_status == 1)
+ if(g_security_status == 1) // it was ok, not it is unknown
g_security_status = 0;
+ if(res == RCode::NXDomain) // if we had servfail, keep on trying more more frequently
+ *last_secpoll=now.tv_sec;
}
if(g_security_status == 2) {