"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pdns_recursor.cc" between
pdns-recursor-4.5.1.tar.bz2 and pdns-recursor-4.5.2.tar.bz2

About: PowerDNS - a separate release of the PowerDNS Recursor (without the authoritative nameserver).

pdns_recursor.cc  (pdns-recursor-4.5.1.tar.bz2):pdns_recursor.cc  (pdns-recursor-4.5.2.tar.bz2)
skipping to change at line 1338 skipping to change at line 1338
static const uint16_t qc(QClass::IN); static const uint16_t qc(QClass::IN);
DNSName qname; DNSName qname;
try { try {
qname = dname + g_nodLookupDomain; qname = dname + g_nodLookupDomain;
} }
catch(const std::range_error &e) { catch(const std::range_error &e) {
++g_stats.nodLookupsDroppedOversize; ++g_stats.nodLookupsDroppedOversize;
return; return;
} }
vector<DNSRecord> dummy; vector<DNSRecord> dummy;
directResolve(qname, qt, qc, dummy); directResolve(qname, qt, qc, dummy, false);
} }
} }
static bool udrCheckUniqueDNSRecord(const DNSName& dname, uint16_t qtype, const DNSRecord& record) static bool udrCheckUniqueDNSRecord(const DNSName& dname, uint16_t qtype, const DNSRecord& record)
{ {
bool ret = false; bool ret = false;
if (record.d_place == DNSResourceRecord::ANSWER || if (record.d_place == DNSResourceRecord::ANSWER ||
record.d_place == DNSResourceRecord::ADDITIONAL) { record.d_place == DNSResourceRecord::ADDITIONAL) {
// Create a string that represent a triplet of (qname, qtype and RR[type, na me, content]) // Create a string that represent a triplet of (qname, qtype and RR[type, na me, content])
std::stringstream ss; std::stringstream ss;
skipping to change at line 4003 skipping to change at line 4003
template ThreadTimes broadcastAccFunction(const boost::function<ThreadTimes*()>& fun); template ThreadTimes broadcastAccFunction(const boost::function<ThreadTimes*()>& fun);
static void handleRCC(int fd, FDMultiplexer::funcparam_t& var) static void handleRCC(int fd, FDMultiplexer::funcparam_t& var)
{ {
try { try {
string remote; string remote;
string msg = s_rcc.recv(&remote).d_str; string msg = s_rcc.recv(&remote).d_str;
RecursorControlParser rcp; RecursorControlParser rcp;
RecursorControlParser::func_t* command; RecursorControlParser::func_t* command;
g_log << Logger::Notice << "Received rec_control command '" << msg << "' fro m control socket" << endl; g_log << Logger::Info << "Received rec_control command '" << msg << "' from control socket" << endl;
auto answer = rcp.getAnswer(fd, msg, &command); auto answer = rcp.getAnswer(fd, msg, &command);
// If we are inside a chroot, we need to strip // If we are inside a chroot, we need to strip
if (!arg()["chroot"].empty()) { if (!arg()["chroot"].empty()) {
size_t len = arg()["chroot"].length(); size_t len = arg()["chroot"].length();
remote = remote.substr(len); remote = remote.substr(len);
} }
s_rcc.send(answer, &remote); s_rcc.send(answer, &remote);
command(); command();
skipping to change at line 4662 skipping to change at line 4662
g_log<<Logger::Warning<<"Will not send queries to: "; g_log<<Logger::Warning<<"Will not send queries to: ";
for(vector<string>::const_iterator i = ips.begin(); i!= ips.end(); ++i) { for(vector<string>::const_iterator i = ips.begin(); i!= ips.end(); ++i) {
SyncRes::addDontQuery(*i); SyncRes::addDontQuery(*i);
if(i!=ips.begin()) if(i!=ips.begin())
g_log<<Logger::Warning<<", "; g_log<<Logger::Warning<<", ";
g_log<<Logger::Warning<<*i; g_log<<Logger::Warning<<*i;
} }
g_log<<Logger::Warning<<endl; g_log<<Logger::Warning<<endl;
} }
g_quiet=::arg().mustDo("quiet");
/* this needs to be done before parseACLs(), which call broadcastFunction() */ /* this needs to be done before parseACLs(), which call broadcastFunction() */
g_weDistributeQueries = ::arg().mustDo("pdns-distributes-queries"); g_weDistributeQueries = ::arg().mustDo("pdns-distributes-queries");
if(g_weDistributeQueries) { if(g_weDistributeQueries) {
g_log<<Logger::Warning<<"PowerDNS Recursor itself will distribute queries ov er threads"<<endl; g_log<<Logger::Warning<<"PowerDNS Recursor itself will distribute queries ov er threads"<<endl;
} }
setupDelegationOnly(); setupDelegationOnly();
g_outgoingEDNSBufsize=::arg().asNum("edns-outgoing-bufsize"); g_outgoingEDNSBufsize=::arg().asNum("edns-outgoing-bufsize");
if(::arg()["trace"]=="fail") { if(::arg()["trace"]=="fail") {
skipping to change at line 5598 skipping to change at line 5596
::arg().set("stats-rec-control-blacklist", "List of statistics that are prev ented from being exported via rec_control get-all (deprecated)")=defaultBlacklis tedStats; ::arg().set("stats-rec-control-blacklist", "List of statistics that are prev ented from being exported via rec_control get-all (deprecated)")=defaultBlacklis tedStats;
::arg().set("stats-snmp-blacklist", "List of statistics that are prevented f rom being exported via SNMP (deprecated)")=defaultBlacklistedStats; ::arg().set("stats-snmp-blacklist", "List of statistics that are prevented f rom being exported via SNMP (deprecated)")=defaultBlacklistedStats;
::arg().set("stats-api-disabled-list", "List of statistics that are disabled when retrieving the complete list of statistics via the API")=defaultBlackliste dStats; ::arg().set("stats-api-disabled-list", "List of statistics that are disabled when retrieving the complete list of statistics via the API")=defaultBlackliste dStats;
::arg().set("stats-carbon-disabled-list", "List of statistics that are preve nted from being exported via Carbon")=defaultBlacklistedStats; ::arg().set("stats-carbon-disabled-list", "List of statistics that are preve nted from being exported via Carbon")=defaultBlacklistedStats;
::arg().set("stats-rec-control-disabled-list", "List of statistics that are prevented from being exported via rec_control get-all")=defaultBlacklistedStats; ::arg().set("stats-rec-control-disabled-list", "List of statistics that are prevented from being exported via rec_control get-all")=defaultBlacklistedStats;
::arg().set("stats-snmp-disabled-list", "List of statistics that are prevent ed from being exported via SNMP")=defaultBlacklistedStats; ::arg().set("stats-snmp-disabled-list", "List of statistics that are prevent ed from being exported via SNMP")=defaultBlacklistedStats;
::arg().set("tcp-fast-open", "Enable TCP Fast Open support on the listening sockets, using the supplied numerical value as the queue size")="0"; ::arg().set("tcp-fast-open", "Enable TCP Fast Open support on the listening sockets, using the supplied numerical value as the queue size")="0";
::arg().set("tcp-fast-open-connect", "Enable TCP Fast Open support on outgoi ng sockets")="no"; ::arg().set("tcp-fast-open-connect", "Enable TCP Fast Open support on outgoi ng sockets")="no";
::arg().set("nsec3-max-iterations", "Maximum number of iterations allowed fo r an NSEC3 record")="2500"; ::arg().set("nsec3-max-iterations", "Maximum number of iterations allowed fo r an NSEC3 record")="150";
::arg().set("cpu-map", "Thread to CPU mapping, space separated thread-id=cpu 1,cpu2..cpuN pairs")=""; ::arg().set("cpu-map", "Thread to CPU mapping, space separated thread-id=cpu 1,cpu2..cpuN pairs")="";
::arg().setSwitch("log-rpz-changes", "Log additions and removals to RPZ zone s at Info level")="no"; ::arg().setSwitch("log-rpz-changes", "Log additions and removals to RPZ zone s at Info level")="no";
::arg().set("xpf-allow-from","XPF information is only processed from these s ubnets")=""; ::arg().set("xpf-allow-from","XPF information is only processed from these s ubnets")="";
::arg().set("xpf-rr-code","XPF option code to use")="0"; ::arg().set("xpf-rr-code","XPF option code to use")="0";
::arg().set("proxy-protocol-from", "A Proxy Protocol header is only allowed from these subnets")=""; ::arg().set("proxy-protocol-from", "A Proxy Protocol header is only allowed from these subnets")="";
::arg().set("proxy-protocol-maximum-size", "The maximum size of a proxy prot ocol payload, including the TLV values")="512"; ::arg().set("proxy-protocol-maximum-size", "The maximum size of a proxy prot ocol payload, including the TLV values")="512";
skipping to change at line 5737 skipping to change at line 5735
} }
if(::arg().mustDo("help")) { if(::arg().mustDo("help")) {
cout<<"syntax:"<<endl<<endl; cout<<"syntax:"<<endl<<endl;
cout<<::arg().helpstring(::arg()["help"])<<endl; cout<<::arg().helpstring(::arg()["help"])<<endl;
exit(0); exit(0);
} }
g_recCache = std::unique_ptr<MemRecursorCache>(new MemRecursorCache(::arg(). asNum("record-cache-shards"))); g_recCache = std::unique_ptr<MemRecursorCache>(new MemRecursorCache(::arg(). asNum("record-cache-shards")));
g_negCache = std::unique_ptr<NegCache>(new NegCache(::arg().asNum("record-ca che-shards"))); g_negCache = std::unique_ptr<NegCache>(new NegCache(::arg().asNum("record-ca che-shards")));
g_quiet=::arg().mustDo("quiet");
Logger::Urgency logUrgency = (Logger::Urgency)::arg().asNum("loglevel"); Logger::Urgency logUrgency = (Logger::Urgency)::arg().asNum("loglevel");
if (logUrgency < Logger::Error) if (logUrgency < Logger::Error)
logUrgency = Logger::Error; logUrgency = Logger::Error;
if(!g_quiet && logUrgency < Logger::Info) { // Logger::Info=6, Logger::Debug =7 if(!g_quiet && logUrgency < Logger::Info) { // Logger::Info=6, Logger::Debug =7
logUrgency = Logger::Info; // if you do --quiet=no, you nee d Info to also see the query log logUrgency = Logger::Info; // if you do --quiet=no, you nee d Info to also see the query log
} }
g_log.setLoglevel(logUrgency); g_log.setLoglevel(logUrgency);
g_log.toConsole(logUrgency); g_log.toConsole(logUrgency);
 End of changes. 5 change blocks. 
5 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)