pkgsrc/net/powerdns-recursor/patches/patch-pdns__recursor.cc
fhajny f8f547a229 Update net/powerdns-recursor to 3.7.3.
Add SMF support.
Defuzz patches.

PowerDNS Recursor 3.7.3
- Limit the maximum length of a qname
- pdnssec: check for glue and delegations in parent zones

PowerDNS Recursor 3.7.2
- Fix handling of forward references in label compressed packets;
  fixes CVE-2015-1868.
- Minor improvements and bugfixes.

PowerDNS Recursor 3.7.1
- New root-nx-trust flag makes PowerDNS generalize NXDOMAIN responses
  from the root-servers
- getregisteredname() for Lua, which turns 'www.bbc.co.uk' into 'bbc.co.uk'
- Lua preoutquery filter
- Lua IP-based filter (ipfilter) before parsing packets
- iputils class for Lua, to quickly process IP addresses and netmasks
  in their native format
- getregisteredname function for Lua, to find the registered domain
  for a given name
- Various new ringbuffers: top-servfail-remotes, top-largeanswer-remotes,
  top-servfail-queries
- Minor improvements and bugfixes.

PowerDNS Recursor 3.6.2
- Minor improvements and bugfixes.

PowerDNS Recursor 3.6.1
- Fix for a crash under a specific sequence of packets.

PowerDNS Recursor 3.6.0
- Implement minimum-ttl-override config setting, plus runtime configurability
  via 'rec_control set-minimum-ttl'.
- Lots of work on the JSON API, which is exposed via Aki Tuomi's 'yahttp'.
- Lua modules can now use 'pdnslog(INFO..')
- Adopt any-to-tcp feature to the recursor.
- Implement built-in statistics dumper using the 'carbon' protocol, which
  is also understood by metronome (our mini-graphite). Use 'carbon-server',
  'carbon-ourname' and 'carbon-interval' settings.
- New setting 'udp-truncation-threshold' to configure from how many bytes
  we should truncate. commit a09a8ce.
- Proper support for CHaos class for CHAOS TXT queries.
- Added support for Lua scripts to drop queries w/o further processing.
- Kevin Holly added qtype statistics to recursor and rec_control.
- Add support for include-files in configuration, also reload ACLs and zones
  defined in them.
- Paulo Anes contributed server-down-max-fails which helps combat
  Recursive DNS based amplification attacks.
- Implement "followCNAMERecords" feature in the Lua hooks.
- Minor improvements and bugfixes.

PowerDNS Recursor 3.5.3
- This is a bugfix and performance update to 3.5.2. It brings serious
  performance improvements for dual stack users.

PowerDNS Recursor 3.5.2
- This is a stability and bugfix update to 3.5.1. It contains important
  fixes that improve operation for certain domains.

PowerDNS Recursor 3.5.1
- This is a stability and bugfix update to 3.5.

PowerDNS Recursor 3.5
- The local zone server now understands wildcards.
- The Lua postresolve and nodata hooks.
- A new feature, rec_control trace-regex allows the tracing of lookups
  for specific names
- A new setting, export-etc-hosts-search-suffix, adds a configurable
  suffix to names imported from /etc/hosts
- Minor improvements & bugfixes

PowerDNS Recursor 3.3.1
- Small number of important fixes, adds some memory usage statistics,
  but no new features
2015-06-10 14:22:29 +00:00

126 lines
4.9 KiB
C++

$NetBSD: patch-pdns__recursor.cc,v 1.4 2015/06/10 14:22:29 fhajny Exp $
Straighten Boost namespace.
Cast to int so we use the correct overload.
--- pdns_recursor.cc.orig 2015-04-21 13:02:57.000000000 +0000
+++ pdns_recursor.cc
@@ -80,12 +80,12 @@ uint64_t g_latencyStatSize;
bool g_logCommonErrors;
bool g_anyToTcp;
uint16_t g_udpTruncationThreshold;
-__thread shared_ptr<RecursorLua>* t_pdl;
+__thread boost::shared_ptr<RecursorLua>* t_pdl;
__thread addrringbuf_t* t_remotes, *t_servfailremotes, *t_largeanswerremotes;
__thread boost::circular_buffer<pair<std::string, uint16_t> >* t_queryring, *t_servfailqueryring;
-__thread shared_ptr<Regex>* t_traceRegex;
+__thread boost::shared_ptr<Regex>* t_traceRegex;
RecursorControlChannel s_rcc; // only active in thread 0
@@ -169,7 +169,7 @@ struct DNSComboWriter {
ComboAddress d_remote, d_local;
bool d_tcp;
int d_socket;
- shared_ptr<TCPConnection> d_tcpConnection;
+ boost::shared_ptr<TCPConnection> d_tcpConnection;
};
@@ -661,7 +661,7 @@ void startDoResolve(void *p)
IpToU32(i->content, &ip);
pw.xfr32BitInt(htonl(ip));
} else {
- shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(i->qtype.getCode(), i->qclass, i->content));
+ boost::shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(i->qtype.getCode(), i->qclass, i->content));
drc->toPacket(pw);
}
if(pw.size() > maxanswersize) {
@@ -814,7 +814,7 @@ void makeControlChannelSocket(int proces
void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var)
{
- shared_ptr<TCPConnection> conn=any_cast<shared_ptr<TCPConnection> >(var);
+ boost::shared_ptr<TCPConnection> conn=any_cast<boost::shared_ptr<TCPConnection> >(var);
if(conn->state==TCPConnection::BYTE0) {
int bytes=recv(conn->getFD(), conn->data, 2, 0);
@@ -919,7 +919,7 @@ void handleNewTCPQuestion(int fd, FDMult
}
Utility::setNonBlocking(newsock);
- shared_ptr<TCPConnection> tc(new TCPConnection(newsock, addr));
+ boost::shared_ptr<TCPConnection> tc(new TCPConnection(newsock, addr));
tc->state=TCPConnection::BYTE0;
t_fdm->addReadFD(tc->getFD(), handleRunningTCPQuestion, tc);
@@ -1081,7 +1081,7 @@ void handleNewUDPQuestion(int fd, FDMult
}
-typedef vector<pair<int, function< void(int, any&) > > > deferredAdd_t;
+typedef vector<pair<int, boost::function< void(int, any&) > > > deferredAdd_t;
deferredAdd_t deferredAdd;
void makeTCPServerSockets()
@@ -1273,7 +1273,7 @@ void doStats(void)
time_t now = time(0);
if(lastOutputTime && lastQueryCount && now != lastOutputTime) {
- L<<Logger::Warning<<"stats: "<< (SyncRes::s_queries - lastQueryCount) / (now - lastOutputTime) <<" qps (average over "<< (now - lastOutputTime) << " seconds)"<<endl;
+ L<<Logger::Warning<<"stats: "<< (SyncRes::s_queries - lastQueryCount) / (now - lastOutputTime) <<" qps (average over "<< (int)(now - lastOutputTime) << " seconds)"<<endl;
}
lastOutputTime = now;
lastQueryCount = SyncRes::s_queries;
@@ -1734,7 +1734,7 @@ string* doReloadLuaScript()
return new string("unloaded\n");
}
else {
- *t_pdl = shared_ptr<RecursorLua>(new RecursorLua(fname));
+ *t_pdl = boost::shared_ptr<RecursorLua>(new RecursorLua(fname));
}
}
catch(std::exception& e) {
@@ -1762,7 +1762,7 @@ try
return new string("unset\n");
}
else {
- (*t_traceRegex) = shared_ptr<Regex>(new Regex(newRegex));
+ (*t_traceRegex) = boost::shared_ptr<Regex>(new Regex(newRegex));
return new string("ok\n");
}
}
@@ -2096,11 +2096,11 @@ try
L<<Logger::Warning<<"Done priming cache with root hints"<<endl;
- t_pdl = new shared_ptr<RecursorLua>();
+ t_pdl = new boost::shared_ptr<RecursorLua>();
try {
if(!::arg()["lua-dns-script"].empty()) {
- *t_pdl = shared_ptr<RecursorLua>(new RecursorLua(::arg()["lua-dns-script"]));
+ *t_pdl = boost::shared_ptr<RecursorLua>(new RecursorLua(::arg()["lua-dns-script"]));
L<<Logger::Warning<<"Loaded 'lua' script from '"<<::arg()["lua-dns-script"]<<"'"<<endl;
}
}
@@ -2109,7 +2109,7 @@ try
_exit(99);
}
- t_traceRegex = new shared_ptr<Regex>();
+ t_traceRegex = new boost::shared_ptr<Regex>();
unsigned int ringsize=::arg().asNum("stats-ringbuffer-entries") / g_numWorkerThreads;
if(ringsize) {
t_remotes = new addrringbuf_t();
@@ -2176,7 +2176,7 @@ try
expired_t expired=t_fdm->getTimeouts(g_now);
for(expired_t::iterator i=expired.begin() ; i != expired.end(); ++i) {
- shared_ptr<TCPConnection> conn=any_cast<shared_ptr<TCPConnection> >(i->second);
+ boost::shared_ptr<TCPConnection> conn=any_cast<boost::shared_ptr<TCPConnection> >(i->second);
if(g_logCommonErrors)
L<<Logger::Warning<<"Timeout from remote TCP client "<< conn->d_remote.toString() <<endl;
t_fdm->removeReadFD(i->first);