View | Details | Raw Unified | Return to bug 233141
Collapse All | Expand All

(-)Makefile (-2 / +5 lines)
Lines 2-9 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	recursor
4
PORTNAME=	recursor
5
DISTVERSION=	4.0.8
5
DISTVERSION=	4.0.9
6
PORTREVISION=	8
6
PORTREVISION?=	0
7
CATEGORIES=	dns ipv6
7
CATEGORIES=	dns ipv6
8
MASTER_SITES=	http://downloads.powerdns.com/releases/
8
MASTER_SITES=	http://downloads.powerdns.com/releases/
9
PKGNAMEPREFIX=	powerdns-
9
PKGNAMEPREFIX=	powerdns-
Lines 20-25 Link Here
20
BROKEN_sparc64=		fails to compile: json11.cpp: undefined reference to std::__throw_out_of_range_fmt
20
BROKEN_sparc64=		fails to compile: json11.cpp: undefined reference to std::__throw_out_of_range_fmt
21
BROKEN_powerpc64=	fails to compile: dnslabeltext.cc: undefined reference to std::__cxx11::basic_string
21
BROKEN_powerpc64=	fails to compile: dnslabeltext.cc: undefined reference to std::__cxx11::basic_string
22
22
23
DEPRECATED=		FreeBSD 10.3 has reached EoL since 2018-04-30; users should upgrade and use dns/powerdns-recursor instead
24
EXPIRATION_DATE=	2018-12-31
25
23
BUILD_DEPENDS=	${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs
26
BUILD_DEPENDS=	${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs
24
LIB_DEPENDS=	libboost_context.so:devel/boost-libs \
27
LIB_DEPENDS=	libboost_context.so:devel/boost-libs \
25
		libprotobuf.so:devel/protobuf
28
		libprotobuf.so:devel/protobuf
(-)distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1513108912
1
TIMESTAMP = 1541587471
2
SHA256 (pdns-recursor-4.0.8.tar.bz2) = 9c6ff00f0e26044b0c81f1a8304743b4fc0f6699a356fce28cc8c2e6aaf16513
2
SHA256 (pdns-recursor-4.0.9.tar.bz2) = a4d8cf2401488c0a2d9c5f97bb6ebf135243edf2272aa66aa3855f94551fe8b8
3
SIZE (pdns-recursor-4.0.8.tar.bz2) = 1071831
3
SIZE (pdns-recursor-4.0.9.tar.bz2) = 1117598
(-)files/patch-boost-1.67 (-114 / +114 lines)
Lines 1-8 Link Here
1
https://github.com/PowerDNS/pdns/commit/e6a9dde524b5
1
https://github.com/PowerDNS/pdns/commit/e6a9dde524b5
2
2
3
--- arguments.cc.orig	2017-12-11 10:38:52 UTC
3
--- arguments.cc.orig	2018-11-06 14:56:58 UTC
4
+++ arguments.cc
4
+++ arguments.cc
5
@@ -443,7 +443,7 @@ bool ArgvMap::file(const char *fname, bool lax, bool i
5
@@ -443,7 +443,7 @@ bool ArgvMap::file(const char *fname, bo
6
     set("include-dir","Directory to include configuration files from");
6
     set("include-dir","Directory to include configuration files from");
7
 
7
 
8
   if(!parseFile(fname, "", lax)) {
8
   if(!parseFile(fname, "", lax)) {
Lines 11-17 Link Here
11
     return false;
11
     return false;
12
   }
12
   }
13
 
13
 
14
@@ -453,7 +453,7 @@ bool ArgvMap::file(const char *fname, bool lax, bool i
14
@@ -453,7 +453,7 @@ bool ArgvMap::file(const char *fname, bo
15
     gatherIncludes(extraConfigs); 
15
     gatherIncludes(extraConfigs); 
16
     for(const std::string& fn :  extraConfigs) {
16
     for(const std::string& fn :  extraConfigs) {
17
       if (!file(fn.c_str(), lax, true)) {
17
       if (!file(fn.c_str(), lax, true)) {
Lines 20-26 Link Here
20
         throw ArgException(fn + " could not be parsed");
20
         throw ArgException(fn + " could not be parsed");
21
       }
21
       }
22
     }
22
     }
23
@@ -471,18 +471,18 @@ void ArgvMap::gatherIncludes(std::vector<std::string> 
23
@@ -471,18 +471,18 @@ void ArgvMap::gatherIncludes(std::vector
24
 
24
 
25
     // stat
25
     // stat
26
     if (stat(params["include-dir"].c_str(), &st)) {
26
     if (stat(params["include-dir"].c_str(), &st)) {
Lines 42-48 Link Here
42
        throw ArgException(params["include-dir"] + " is not accessible");
42
        throw ArgException(params["include-dir"] + " is not accessible");
43
     }
43
     }
44
 
44
 
45
@@ -494,7 +494,7 @@ void ArgvMap::gatherIncludes(std::vector<std::string> 
45
@@ -494,7 +494,7 @@ void ArgvMap::gatherIncludes(std::vector
46
         namebuf << params["include-dir"].c_str() << "/" << ent->d_name; // FIXME: Use some path separator
46
         namebuf << params["include-dir"].c_str() << "/" << ent->d_name; // FIXME: Use some path separator
47
         // ensure it's readable file
47
         // ensure it's readable file
48
         if (stat(namebuf.str().c_str(), &st) || !S_ISREG(st.st_mode)) {
48
         if (stat(namebuf.str().c_str(), &st) || !S_ISREG(st.st_mode)) {
Lines 51-59 Link Here
51
           closedir(dir);
51
           closedir(dir);
52
           throw ArgException(namebuf.str() + " does not exist!");
52
           throw ArgException(namebuf.str() + " does not exist!");
53
         }
53
         }
54
--- dns.hh.orig	2017-12-11 10:38:52 UTC
54
--- dns.hh.orig	2018-11-06 14:56:58 UTC
55
+++ dns.hh
55
+++ dns.hh
56
@@ -241,7 +241,6 @@ inline uint16_t * getFlagsFromDNSHeader(struct dnshead
56
@@ -241,7 +241,6 @@ inline uint16_t * getFlagsFromDNSHeader(
57
 #define FLAGS_CD_OFFSET (12)
57
 #define FLAGS_CD_OFFSET (12)
58
 #endif
58
 #endif
59
 
59
 
Lines 61-69 Link Here
61
 extern time_t s_starttime;
61
 extern time_t s_starttime;
62
 
62
 
63
 uint32_t hashQuestion(const char* packet, uint16_t len, uint32_t init);
63
 uint32_t hashQuestion(const char* packet, uint16_t len, uint32_t init);
64
--- gss_context.cc.orig	2017-12-11 10:38:52 UTC
64
--- gss_context.cc.orig	2018-11-06 14:56:58 UTC
65
+++ gss_context.cc
65
+++ gss_context.cc
66
@@ -456,17 +456,17 @@ bool gss_add_signature(const DNSName& context, const s
66
@@ -456,17 +456,17 @@ bool gss_add_signature(const DNSName& co
67
   string tmp_mac;
67
   string tmp_mac;
68
   GssContext gssctx(context);
68
   GssContext gssctx(context);
69
   if (!gssctx.valid()) {
69
   if (!gssctx.valid()) {
Lines 85-91 Link Here
85
     }
85
     }
86
     return false;
86
     return false;
87
   }
87
   }
88
@@ -477,17 +477,17 @@ bool gss_add_signature(const DNSName& context, const s
88
@@ -477,17 +477,17 @@ bool gss_add_signature(const DNSName& co
89
 bool gss_verify_signature(const DNSName& context, const std::string& message, const std::string& mac) {
89
 bool gss_verify_signature(const DNSName& context, const std::string& message, const std::string& mac) {
90
   GssContext gssctx(context);
90
   GssContext gssctx(context);
91
   if (!gssctx.valid()) {
91
   if (!gssctx.valid()) {
Lines 107-113 Link Here
107
     }
107
     }
108
     return false;
108
     return false;
109
   }
109
   }
110
--- logger.cc.orig	2017-12-11 10:38:52 UTC
110
--- logger.cc.orig	2018-11-06 14:56:58 UTC
111
+++ logger.cc
111
+++ logger.cc
112
@@ -32,15 +32,9 @@ extern StatBag S;
112
@@ -32,15 +32,9 @@ extern StatBag S;
113
 #include "namespaces.hh"
113
 #include "namespaces.hh"
Lines 127-133 Link Here
127
 
127
 
128
 void Logger::log(const string &msg, Urgency u)
128
 void Logger::log(const string &msg, Urgency u)
129
 {
129
 {
130
@@ -102,7 +96,7 @@ void Logger::setName(const string &_name)
130
@@ -102,7 +96,7 @@ void Logger::setName(const string &_name
131
 
131
 
132
 void Logger::initKey()
132
 void Logger::initKey()
133
 {
133
 {
Lines 136-142 Link Here
136
     unixDie("Creating thread key for logger");
136
     unixDie("Creating thread key for logger");
137
 }
137
 }
138
 
138
 
139
@@ -137,13 +131,13 @@ void Logger::perThreadDestructor(void* buf)
139
@@ -137,13 +131,13 @@ void Logger::perThreadDestructor(void* b
140
 
140
 
141
 Logger::PerThread* Logger::getPerThread()
141
 Logger::PerThread* Logger::getPerThread()
142
 {
142
 {
Lines 152-160 Link Here
152
   }
152
   }
153
   return ret;
153
   return ret;
154
 }
154
 }
155
--- logger.hh.orig	2017-12-11 10:38:52 UTC
155
--- logger.hh.orig	2018-11-06 14:56:58 UTC
156
+++ logger.hh
156
+++ logger.hh
157
@@ -66,9 +66,9 @@ class Logger (public)
157
@@ -66,9 +66,9 @@ public:
158
   void resetFlags(){flags=0;open();} //!< zero the flags
158
   void resetFlags(){flags=0;open();} //!< zero the flags
159
   /** Use this to stream to your log, like this:
159
   /** Use this to stream to your log, like this:
160
       \code
160
       \code
Lines 167-173 Link Here
167
       \endcode
167
       \endcode
168
   */
168
   */
169
   Logger& operator<<(const char *s);
169
   Logger& operator<<(const char *s);
170
@@ -108,10 +108,10 @@ class Logger (public)
170
@@ -108,10 +108,10 @@ private:
171
   bool opened;
171
   bool opened;
172
   bool d_disableSyslog;
172
   bool d_disableSyslog;
173
   static pthread_once_t s_once;
173
   static pthread_once_t s_once;
Lines 180-188 Link Here
180
 
180
 
181
 #ifdef VERBOSELOG
181
 #ifdef VERBOSELOG
182
 #define DLOG(x) x
182
 #define DLOG(x) x
183
--- lua-recursor4.cc.orig	2017-12-11 10:38:52 UTC
183
--- lua-recursor4.cc.orig	2018-11-06 14:56:58 UTC
184
+++ lua-recursor4.cc
184
+++ lua-recursor4.cc
185
@@ -79,7 +79,6 @@ int RecursorLua4::gettag(const ComboAddress& remote, c
185
@@ -78,7 +78,6 @@ int RecursorLua4::gettag(const ComboAddr
186
 
186
 
187
 
187
 
188
 #else
188
 #else
Lines 190-196 Link Here
190
 #include "ext/luawrapper/include/LuaContext.hpp"
190
 #include "ext/luawrapper/include/LuaContext.hpp"
191
 
191
 
192
 static int followCNAMERecords(vector<DNSRecord>& ret, const QType& qtype)
192
 static int followCNAMERecords(vector<DNSRecord>& ret, const QType& qtype)
193
@@ -310,7 +309,7 @@ RecursorLua4::RecursorLua4(const std::string& fname)
193
@@ -309,7 +308,7 @@ RecursorLua4::RecursorLua4(const std::st
194
           cas.insert(boost::get<ComboAddress>(in));
194
           cas.insert(boost::get<ComboAddress>(in));
195
         }
195
         }
196
       }
196
       }
Lines 199-205 Link Here
199
     });
199
     });
200
 
200
 
201
   d_lw->registerFunction<bool(cas_t::*)(const ComboAddress&)>("check",[](const cas_t& cas, const ComboAddress&ca) {
201
   d_lw->registerFunction<bool(cas_t::*)(const ComboAddress&)>("check",[](const cas_t& cas, const ComboAddress&ca) {
202
@@ -464,7 +463,7 @@ RecursorLua4::RecursorLua4(const std::string& fname)
202
@@ -463,7 +462,7 @@ RecursorLua4::RecursorLua4(const std::st
203
         }
203
         }
204
       }
204
       }
205
       catch(std::exception& e) {
205
       catch(std::exception& e) {
Lines 208-214 Link Here
208
       }
208
       }
209
     }
209
     }
210
   );
210
   );
211
@@ -474,7 +473,7 @@ RecursorLua4::RecursorLua4(const std::string& fname)
211
@@ -473,7 +472,7 @@ RecursorLua4::RecursorLua4(const std::st
212
 
212
 
213
 
213
 
214
   d_lw->writeFunction("pdnslog", [](const std::string& msg, boost::optional<int> loglevel) {
214
   d_lw->writeFunction("pdnslog", [](const std::string& msg, boost::optional<int> loglevel) {
Lines 217-223 Link Here
217
     });
217
     });
218
   typedef vector<pair<string, int> > in_t;
218
   typedef vector<pair<string, int> > in_t;
219
   vector<pair<string, boost::variant<int, in_t, struct timeval* > > >  pd{
219
   vector<pair<string, boost::variant<int, in_t, struct timeval* > > >  pd{
220
@@ -650,7 +649,7 @@ loop:;
220
@@ -649,7 +648,7 @@ loop:;
221
         dq->udpAnswer = GenUDPQueryResponse(dq->udpQueryDest, dq->udpQuery);
221
         dq->udpAnswer = GenUDPQueryResponse(dq->udpQueryDest, dq->udpQuery);
222
         auto cbFunc = d_lw->readVariable<boost::optional<luacall_t>>(dq->udpCallback).get_value_or(0);
222
         auto cbFunc = d_lw->readVariable<boost::optional<luacall_t>>(dq->udpCallback).get_value_or(0);
223
         if(!cbFunc) {
223
         if(!cbFunc) {
Lines 226-234 Link Here
226
           return false;
226
           return false;
227
         }
227
         }
228
         bool result=cbFunc(dq);
228
         bool result=cbFunc(dq);
229
--- lwres.cc.orig	2017-12-11 10:38:52 UTC
229
--- lwres.cc.orig	2018-11-06 14:56:58 UTC
230
+++ lwres.cc
230
+++ lwres.cc
231
@@ -236,7 +236,7 @@ int asyncresolve(const ComboAddress& ip, const DNSName
231
@@ -236,7 +236,7 @@ int asyncresolve(const ComboAddress& ip,
232
 
232
 
233
     if(domain != mdp.d_qname) { 
233
     if(domain != mdp.d_qname) { 
234
       if(!mdp.d_qname.empty() && domain.toString().find((char)0) == string::npos /* ugly */) {// embedded nulls are too noisy, plus empty domains are too
234
       if(!mdp.d_qname.empty() && domain.toString().find((char)0) == string::npos /* ugly */) {// embedded nulls are too noisy, plus empty domains are too
Lines 237-243 Link Here
237
       }
237
       }
238
       // unexpected count has already been done @ pdns_recursor.cc
238
       // unexpected count has already been done @ pdns_recursor.cc
239
       goto out;
239
       goto out;
240
@@ -276,7 +276,7 @@ int asyncresolve(const ComboAddress& ip, const DNSName
240
@@ -276,7 +276,7 @@ int asyncresolve(const ComboAddress& ip,
241
   }
241
   }
242
   catch(std::exception &mde) {
242
   catch(std::exception &mde) {
243
     if(::arg().mustDo("log-common-errors"))
243
     if(::arg().mustDo("log-common-errors"))
Lines 246-252 Link Here
246
     lwr->d_rcode = RCode::FormErr;
246
     lwr->d_rcode = RCode::FormErr;
247
     g_stats.serverParseError++;
247
     g_stats.serverParseError++;
248
 #ifdef HAVE_PROTOBUF
248
 #ifdef HAVE_PROTOBUF
249
@@ -287,7 +287,7 @@ int asyncresolve(const ComboAddress& ip, const DNSName
249
@@ -287,7 +287,7 @@ int asyncresolve(const ComboAddress& ip,
250
     return 1; // success - oddly enough
250
     return 1; // success - oddly enough
251
   }
251
   }
252
   catch(...) {
252
   catch(...) {
Lines 255-263 Link Here
255
   }
255
   }
256
   
256
   
257
   g_stats.serverParseError++; 
257
   g_stats.serverParseError++; 
258
--- pdns_recursor.cc.orig	2017-12-11 10:38:52 UTC
258
--- pdns_recursor.cc.orig	2018-11-06 14:56:58 UTC
259
+++ pdns_recursor.cc
259
+++ pdns_recursor.cc
260
@@ -347,12 +347,12 @@ void setSocketBuffer(int fd, int optname, uint32_t siz
260
@@ -347,12 +347,12 @@ void setSocketBuffer(int fd, int optname
261
   socklen_t len=sizeof(psize);
261
   socklen_t len=sizeof(psize);
262
 
262
 
263
   if(!getsockopt(fd, SOL_SOCKET, optname, (char*)&psize, &len) && psize > size) {
263
   if(!getsockopt(fd, SOL_SOCKET, optname, (char*)&psize, &len) && psize > size) {
Lines 272-278 Link Here
272
 }
272
 }
273
 
273
 
274
 
274
 
275
@@ -395,7 +395,7 @@ class UDPClientSocks (public)
275
@@ -395,7 +395,7 @@ public:
276
         closesocket(*fd);
276
         closesocket(*fd);
277
       }
277
       }
278
       catch(const PDNSException& e) {
278
       catch(const PDNSException& e) {
Lines 281-287 Link Here
281
       }
281
       }
282
 
282
 
283
       if(err==ENETUNREACH) // Seth "My Interfaces Are Like A Yo Yo" Arnold special
283
       if(err==ENETUNREACH) // Seth "My Interfaces Are Like A Yo Yo" Arnold special
284
@@ -433,7 +433,7 @@ class UDPClientSocks (public)
284
@@ -433,7 +433,7 @@ public:
285
       closesocket(*i);
285
       closesocket(*i);
286
     }
286
     }
287
     catch(const PDNSException& e) {
287
     catch(const PDNSException& e) {
Lines 290-296 Link Here
290
     }
290
     }
291
 
291
 
292
     d_socks.erase(i++);
292
     d_socks.erase(i++);
293
@@ -549,7 +549,7 @@ int arecvfrom(char *data, size_t len, int flags, const
293
@@ -549,7 +549,7 @@ int arecvfrom(char *data, size_t len, in
294
     *d_len=packet.size();
294
     *d_len=packet.size();
295
     memcpy(data,packet.c_str(),min(len,*d_len));
295
     memcpy(data,packet.c_str(),min(len,*d_len));
296
     if(*nearMissLimit && pident.nearMisses > *nearMissLimit) {
296
     if(*nearMissLimit && pident.nearMisses > *nearMissLimit) {
Lines 420-426 Link Here
420
-        L<<Logger::Warning<<"Sending UDP reply to client "<<dc->d_remote.toStringWithPort()<<" failed with: "<<strerror(errno)<<endl;
420
-        L<<Logger::Warning<<"Sending UDP reply to client "<<dc->d_remote.toStringWithPort()<<" failed with: "<<strerror(errno)<<endl;
421
+        g_log<<Logger::Warning<<"Sending UDP reply to client "<<dc->d_remote.toStringWithPort()<<" failed with: "<<strerror(errno)<<endl;
421
+        g_log<<Logger::Warning<<"Sending UDP reply to client "<<dc->d_remote.toStringWithPort()<<" failed with: "<<strerror(errno)<<endl;
422
       if(!SyncRes::s_nopacketcache && !variableAnswer && !sr.wasVariable() ) {
422
       if(!SyncRes::s_nopacketcache && !variableAnswer && !sr.wasVariable() ) {
423
         t_packetCache->insertResponsePacket(dc->d_tag, dc->d_mdp.d_qname, dc->d_mdp.d_qtype, dc->d_query,
423
         t_packetCache->insertResponsePacket(dc->d_tag, dc->d_mdp.d_qname, dc->d_mdp.d_qtype, dc->d_mdp.d_qclass, dc->d_query,
424
                                             string((const char*)&*packet.begin(), packet.size()),
424
                                             string((const char*)&*packet.begin(), packet.size()),
425
@@ -1157,11 +1157,11 @@ void startDoResolve(void *p)
425
@@ -1157,11 +1157,11 @@ void startDoResolve(void *p)
426
       bool hadError=true;
426
       bool hadError=true;
Lines 483-489 Link Here
483
   }
483
   }
484
 
484
 
485
   g_stats.maxMThreadStackUsage = max(MT->getMaxStackUsage(), g_stats.maxMThreadStackUsage);
485
   g_stats.maxMThreadStackUsage = max(MT->getMaxStackUsage(), g_stats.maxMThreadStackUsage);
486
@@ -1322,7 +1322,7 @@ void handleRunningTCPQuestion(int fd, FDMultiplexer::f
486
@@ -1322,7 +1322,7 @@ void handleRunningTCPQuestion(int fd, FD
487
     }
487
     }
488
     if(!bytes || bytes < 0) {
488
     if(!bytes || bytes < 0) {
489
       if(g_logCommonErrors)
489
       if(g_logCommonErrors)
Lines 492-498 Link Here
492
       t_fdm->removeReadFD(fd);
492
       t_fdm->removeReadFD(fd);
493
       return;
493
       return;
494
     }
494
     }
495
@@ -1330,7 +1330,7 @@ void handleRunningTCPQuestion(int fd, FDMultiplexer::f
495
@@ -1330,7 +1330,7 @@ void handleRunningTCPQuestion(int fd, FD
496
   else if(conn->state==TCPConnection::GETQUESTION) {
496
   else if(conn->state==TCPConnection::GETQUESTION) {
497
     ssize_t bytes=recv(conn->getFD(), conn->data + conn->bytesread, conn->qlen - conn->bytesread, 0);
497
     ssize_t bytes=recv(conn->getFD(), conn->data + conn->bytesread, conn->qlen - conn->bytesread, 0);
498
     if(!bytes || bytes < 0 || bytes > std::numeric_limits<std::uint16_t>::max()) {
498
     if(!bytes || bytes < 0 || bytes > std::numeric_limits<std::uint16_t>::max()) {
Lines 501-507 Link Here
501
       t_fdm->removeReadFD(fd);
501
       t_fdm->removeReadFD(fd);
502
       return;
502
       return;
503
     }
503
     }
504
@@ -1345,7 +1345,7 @@ void handleRunningTCPQuestion(int fd, FDMultiplexer::f
504
@@ -1345,7 +1345,7 @@ void handleRunningTCPQuestion(int fd, FD
505
       catch(MOADNSException &mde) {
505
       catch(MOADNSException &mde) {
506
         g_stats.clientParseError++;
506
         g_stats.clientParseError++;
507
         if(g_logCommonErrors)
507
         if(g_logCommonErrors)
Lines 510-516 Link Here
510
         return;
510
         return;
511
       }
511
       }
512
       dc->d_tcpConnection = conn; // carry the torch
512
       dc->d_tcpConnection = conn; // carry the torch
513
@@ -1381,14 +1381,14 @@ void handleRunningTCPQuestion(int fd, FDMultiplexer::f
513
@@ -1381,14 +1381,14 @@ void handleRunningTCPQuestion(int fd, FD
514
             }
514
             }
515
             catch(std::exception& e)  {
515
             catch(std::exception& e)  {
516
               if(g_logCommonErrors)
516
               if(g_logCommonErrors)
Lines 527-533 Link Here
527
         }
527
         }
528
       }
528
       }
529
 #ifdef HAVE_PROTOBUF
529
 #ifdef HAVE_PROTOBUF
530
@@ -1404,20 +1404,20 @@ void handleRunningTCPQuestion(int fd, FDMultiplexer::f
530
@@ -1404,20 +1404,20 @@ void handleRunningTCPQuestion(int fd, FD
531
         }
531
         }
532
         catch(std::exception& e) {
532
         catch(std::exception& e) {
533
           if(g_logCommonErrors)
533
           if(g_logCommonErrors)
Lines 551-557 Link Here
551
         return;
551
         return;
552
       }
552
       }
553
       else {
553
       else {
554
@@ -1443,7 +1443,7 @@ void handleNewTCPQuestion(int fd, FDMultiplexer::funcp
554
@@ -1443,7 +1443,7 @@ void handleNewTCPQuestion(int fd, FDMult
555
         closesocket(newsock);
555
         closesocket(newsock);
556
       }
556
       }
557
       catch(const PDNSException& e) {
557
       catch(const PDNSException& e) {
Lines 560-566 Link Here
560
       }
560
       }
561
       return;
561
       return;
562
     }
562
     }
563
@@ -1452,14 +1452,14 @@ void handleNewTCPQuestion(int fd, FDMultiplexer::funcp
563
@@ -1452,14 +1452,14 @@ void handleNewTCPQuestion(int fd, FDMult
564
       t_remotes->push_back(addr);
564
       t_remotes->push_back(addr);
565
     if(t_allowFrom && !t_allowFrom->match(&addr)) {
565
     if(t_allowFrom && !t_allowFrom->match(&addr)) {
566
       if(!g_quiet)
566
       if(!g_quiet)
Lines 577-583 Link Here
577
       }
577
       }
578
       return;
578
       return;
579
     }
579
     }
580
@@ -1469,7 +1469,7 @@ void handleNewTCPQuestion(int fd, FDMultiplexer::funcp
580
@@ -1469,7 +1469,7 @@ void handleNewTCPQuestion(int fd, FDMult
581
         closesocket(newsock); // don't call TCPConnection::closeAndCleanup here - did not enter it in the counts yet!
581
         closesocket(newsock); // don't call TCPConnection::closeAndCleanup here - did not enter it in the counts yet!
582
       }
582
       }
583
       catch(const PDNSException& e) {
583
       catch(const PDNSException& e) {
Lines 586-592 Link Here
586
       }
586
       }
587
       return;
587
       return;
588
     }
588
     }
589
@@ -1547,14 +1547,14 @@ string* doProcessUDPQuestion(const std::string& questi
589
@@ -1547,14 +1547,14 @@ string* doProcessUDPQuestion(const std::
590
           }
590
           }
591
           catch(std::exception& e)  {
591
           catch(std::exception& e)  {
592
             if(g_logCommonErrors)
592
             if(g_logCommonErrors)
Lines 603-609 Link Here
603
       }
603
       }
604
     }
604
     }
605
 
605
 
606
@@ -1579,7 +1579,7 @@ string* doProcessUDPQuestion(const std::string& questi
606
@@ -1579,7 +1579,7 @@ string* doProcessUDPQuestion(const std::
607
       }
607
       }
608
 #endif /* HAVE_PROTOBUF */
608
 #endif /* HAVE_PROTOBUF */
609
       if(!g_quiet)
609
       if(!g_quiet)
Lines 612-618 Link Here
612
 
612
 
613
       g_stats.packetCacheHits++;
613
       g_stats.packetCacheHits++;
614
       SyncRes::s_queries++;
614
       SyncRes::s_queries++;
615
@@ -1594,7 +1594,7 @@ string* doProcessUDPQuestion(const std::string& questi
615
@@ -1594,7 +1594,7 @@ string* doProcessUDPQuestion(const std::
616
 	addCMsgSrcAddr(&msgh, cbuf, &destaddr, 0);
616
 	addCMsgSrcAddr(&msgh, cbuf, &destaddr, 0);
617
       }
617
       }
618
       if(sendmsg(fd, &msgh, 0) < 0 && g_logCommonErrors)
618
       if(sendmsg(fd, &msgh, 0) < 0 && g_logCommonErrors)
Lines 621-627 Link Here
621
 
621
 
622
       if(response.length() >= sizeof(struct dnsheader)) {
622
       if(response.length() >= sizeof(struct dnsheader)) {
623
         struct dnsheader tmpdh;
623
         struct dnsheader tmpdh;
624
@@ -1606,14 +1606,14 @@ string* doProcessUDPQuestion(const std::string& questi
624
@@ -1606,14 +1606,14 @@ string* doProcessUDPQuestion(const std::
625
     }
625
     }
626
   }
626
   }
627
   catch(std::exception& e) {
627
   catch(std::exception& e) {
Lines 638-644 Link Here
638
       g_stats.policyDrops++;
638
       g_stats.policyDrops++;
639
       return 0;
639
       return 0;
640
     }
640
     }
641
@@ -1621,7 +1621,7 @@ string* doProcessUDPQuestion(const std::string& questi
641
@@ -1621,7 +1621,7 @@ string* doProcessUDPQuestion(const std::
642
 
642
 
643
   if(MT->numProcesses() > g_maxMThreads) {
643
   if(MT->numProcesses() > g_maxMThreads) {
644
     if(!g_quiet)
644
     if(!g_quiet)
Lines 647-653 Link Here
647
 
647
 
648
     g_stats.overCapacityDrops++;
648
     g_stats.overCapacityDrops++;
649
     return 0;
649
     return 0;
650
@@ -1672,7 +1672,7 @@ void handleNewUDPQuestion(int fd, FDMultiplexer::funcp
650
@@ -1672,7 +1672,7 @@ void handleNewUDPQuestion(int fd, FDMult
651
 
651
 
652
     if(t_allowFrom && !t_allowFrom->match(&fromaddr)) {
652
     if(t_allowFrom && !t_allowFrom->match(&fromaddr)) {
653
       if(!g_quiet)
653
       if(!g_quiet)
Lines 656-662 Link Here
656
 
656
 
657
       g_stats.unauthorizedUDP++;
657
       g_stats.unauthorizedUDP++;
658
       return;
658
       return;
659
@@ -1680,7 +1680,7 @@ void handleNewUDPQuestion(int fd, FDMultiplexer::funcp
659
@@ -1680,7 +1680,7 @@ void handleNewUDPQuestion(int fd, FDMult
660
     BOOST_STATIC_ASSERT(offsetof(sockaddr_in, sin_port) == offsetof(sockaddr_in6, sin6_port));
660
     BOOST_STATIC_ASSERT(offsetof(sockaddr_in, sin_port) == offsetof(sockaddr_in6, sin6_port));
661
     if(!fromaddr.sin4.sin_port) { // also works for IPv6
661
     if(!fromaddr.sin4.sin_port) { // also works for IPv6
662
      if(!g_quiet)
662
      if(!g_quiet)
Lines 665-671 Link Here
665
 
665
 
666
       g_stats.clientParseError++; // not quite the best place to put it, but needs to go somewhere
666
       g_stats.clientParseError++; // not quite the best place to put it, but needs to go somewhere
667
       return;
667
       return;
668
@@ -1691,12 +1691,12 @@ void handleNewUDPQuestion(int fd, FDMultiplexer::funcp
668
@@ -1691,12 +1691,12 @@ void handleNewUDPQuestion(int fd, FDMult
669
       if(dh->qr) {
669
       if(dh->qr) {
670
         g_stats.ignoredCount++;
670
         g_stats.ignoredCount++;
671
         if(g_logCommonErrors)
671
         if(g_logCommonErrors)
Lines 680-686 Link Here
680
       }
680
       }
681
       else {
681
       else {
682
         string question(data, (size_t)len);
682
         string question(data, (size_t)len);
683
@@ -1729,12 +1729,12 @@ void handleNewUDPQuestion(int fd, FDMultiplexer::funcp
683
@@ -1729,12 +1729,12 @@ void handleNewUDPQuestion(int fd, FDMult
684
     catch(MOADNSException& mde) {
684
     catch(MOADNSException& mde) {
685
       g_stats.clientParseError++;
685
       g_stats.clientParseError++;
686
       if(g_logCommonErrors)
686
       if(g_logCommonErrors)
Lines 840-846 Link Here
840
       throw;
840
       throw;
841
     }
841
     }
842
 }
842
 }
843
@@ -2140,11 +2140,11 @@ void handlePipeRequest(int fd, FDMultiplexer::funcpara
843
@@ -2140,11 +2140,11 @@ void handlePipeRequest(int fd, FDMultipl
844
   }
844
   }
845
   catch(std::exception& e) {
845
   catch(std::exception& e) {
846
     if(g_logCommonErrors)
846
     if(g_logCommonErrors)
Lines 854-860 Link Here
854
   }
854
   }
855
   if(tmsg->wantAnswer) {
855
   if(tmsg->wantAnswer) {
856
     if(write(g_pipes[t_id].writeFromThread, &resp, sizeof(resp)) != sizeof(resp)) {
856
     if(write(g_pipes[t_id].writeFromThread, &resp, sizeof(resp)) != sizeof(resp)) {
857
@@ -2245,10 +2245,10 @@ void handleRCC(int fd, FDMultiplexer::funcparam_t& var
857
@@ -2245,10 +2245,10 @@ void handleRCC(int fd, FDMultiplexer::fu
858
     command();
858
     command();
859
   }
859
   }
860
   catch(std::exception& e) {
860
   catch(std::exception& e) {
Lines 867-873 Link Here
867
   }
867
   }
868
 }
868
 }
869
 
869
 
870
@@ -2335,7 +2335,7 @@ void handleUDPServerResponse(int fd, FDMultiplexer::fu
870
@@ -2335,7 +2335,7 @@ void handleUDPServerResponse(int fd, FDM
871
     else {
871
     else {
872
       g_stats.serverParseError++;
872
       g_stats.serverParseError++;
873
       if(g_logCommonErrors)
873
       if(g_logCommonErrors)
Lines 876-882 Link Here
876
           ": packet smaller than DNS header"<<endl;
876
           ": packet smaller than DNS header"<<endl;
877
     }
877
     }
878
 
878
 
879
@@ -2359,7 +2359,7 @@ void handleUDPServerResponse(int fd, FDMultiplexer::fu
879
@@ -2359,7 +2359,7 @@ void handleUDPServerResponse(int fd, FDM
880
   pident.fd=fd;
880
   pident.fd=fd;
881
 
881
 
882
   if(!dh.qr && g_logCommonErrors) {
882
   if(!dh.qr && g_logCommonErrors) {
Lines 885-891 Link Here
885
   }
885
   }
886
 
886
 
887
   if(!dh.qdcount || // UPC, Nominum, very old BIND on FormErr, NSD
887
   if(!dh.qdcount || // UPC, Nominum, very old BIND on FormErr, NSD
888
@@ -2374,7 +2374,7 @@ void handleUDPServerResponse(int fd, FDMultiplexer::fu
888
@@ -2374,7 +2374,7 @@ void handleUDPServerResponse(int fd, FDM
889
     }
889
     }
890
     catch(std::exception& e) {
890
     catch(std::exception& e) {
891
       g_stats.serverParseError++; // won't be fed to lwres.cc, so we have to increment
891
       g_stats.serverParseError++; // won't be fed to lwres.cc, so we have to increment
Lines 1307-1313 Link Here
1307
+    g_log<<Logger::Error<<"Failed to update . records, RCODE="<<res<<endl;
1307
+    g_log<<Logger::Error<<"Failed to update . records, RCODE="<<res<<endl;
1308
   return res;
1308
   return res;
1309
 }
1309
 }
1310
--- randomhelper.cc.orig	2017-12-11 10:38:52 UTC
1310
--- randomhelper.cc.orig	2018-11-06 14:56:58 UTC
1311
+++ randomhelper.cc
1311
+++ randomhelper.cc
1312
@@ -11,11 +11,11 @@
1312
@@ -11,11 +11,11 @@
1313
 
1313
 
Lines 1338-1344 Link Here
1338
       close(fd);
1338
       close(fd);
1339
       exit(EXIT_FAILURE);
1339
       exit(EXIT_FAILURE);
1340
     }
1340
     }
1341
--- rec-carbon.cc.orig	2017-12-11 10:38:52 UTC
1341
--- rec-carbon.cc.orig	2018-11-06 14:56:58 UTC
1342
+++ rec-carbon.cc
1342
+++ rec-carbon.cc
1343
@@ -60,16 +60,16 @@ try
1343
@@ -60,16 +60,16 @@ try
1344
 
1344
 
Lines 1361-1369 Link Here
1361
-  L<<Logger::Error<<"Error in carbon thread: "<<e.what()<<endl;
1361
-  L<<Logger::Error<<"Error in carbon thread: "<<e.what()<<endl;
1362
+  g_log<<Logger::Error<<"Error in carbon thread: "<<e.what()<<endl;
1362
+  g_log<<Logger::Error<<"Error in carbon thread: "<<e.what()<<endl;
1363
 }
1363
 }
1364
--- rec-lua-conf.cc.orig	2017-12-11 10:38:52 UTC
1364
--- rec-lua-conf.cc.orig	2018-11-06 14:56:58 UTC
1365
+++ rec-lua-conf.cc
1365
+++ rec-lua-conf.cc
1366
@@ -119,13 +119,13 @@ void loadRecursorLuaConfig(const std::string& fname, b
1366
@@ -119,13 +119,13 @@ void loadRecursorLuaConfig(const std::st
1367
             lci.dfe.reserve(zoneIdx, static_cast<size_t>(boost::get<int>(constGet(have, "zoneSizeHint"))));
1367
             lci.dfe.reserve(zoneIdx, static_cast<size_t>(boost::get<int>(constGet(have, "zoneSizeHint"))));
1368
           }
1368
           }
1369
 	}
1369
 	}
Lines 1380-1386 Link Here
1380
       }
1380
       }
1381
     });
1381
     });
1382
 
1382
 
1383
@@ -198,10 +198,10 @@ void loadRecursorLuaConfig(const std::string& fname, b
1383
@@ -198,10 +198,10 @@ void loadRecursorLuaConfig(const std::st
1384
         }
1384
         }
1385
       }
1385
       }
1386
       catch(std::exception& e) {
1386
       catch(std::exception& e) {
Lines 1393-1399 Link Here
1393
       }
1393
       }
1394
 
1394
 
1395
     });
1395
     });
1396
@@ -234,7 +234,7 @@ void loadRecursorLuaConfig(const std::string& fname, b
1396
@@ -234,7 +234,7 @@ void loadRecursorLuaConfig(const std::st
1397
 			}
1397
 			}
1398
 		      }
1398
 		      }
1399
 		      catch(std::exception& e) {
1399
 		      catch(std::exception& e) {
Lines 1402-1408 Link Here
1402
 		      }
1402
 		      }
1403
 		    });
1403
 		    });
1404
 
1404
 
1405
@@ -282,14 +282,14 @@ void loadRecursorLuaConfig(const std::string& fname, b
1405
@@ -282,14 +282,14 @@ void loadRecursorLuaConfig(const std::st
1406
           }
1406
           }
1407
         }
1407
         }
1408
         else {
1408
         else {
Lines 1420-1426 Link Here
1420
       }
1420
       }
1421
     });
1421
     });
1422
 
1422
 
1423
@@ -302,14 +302,14 @@ void loadRecursorLuaConfig(const std::string& fname, b
1423
@@ -302,14 +302,14 @@ void loadRecursorLuaConfig(const std::st
1424
           }
1424
           }
1425
         }
1425
         }
1426
         else {
1426
         else {
Lines 1438-1444 Link Here
1438
       }
1438
       }
1439
     });
1439
     });
1440
 #endif
1440
 #endif
1441
@@ -319,22 +319,22 @@ void loadRecursorLuaConfig(const std::string& fname, b
1441
@@ -319,22 +319,22 @@ void loadRecursorLuaConfig(const std::st
1442
     g_luaconfs.setState(lci);
1442
     g_luaconfs.setState(lci);
1443
   }
1443
   }
1444
   catch(const LuaContext::ExecutionErrorException& e) {
1444
   catch(const LuaContext::ExecutionErrorException& e) {
Lines 1465-1473 Link Here
1465
     throw;
1465
     throw;
1466
   }
1466
   }
1467
 
1467
 
1468
--- rec_channel_rec.cc.orig	2017-12-11 10:38:52 UTC
1468
--- rec_channel_rec.cc.orig	2018-11-06 14:56:58 UTC
1469
+++ rec_channel_rec.cc
1469
+++ rec_channel_rec.cc
1470
@@ -353,7 +353,7 @@ string doSetDnssecLogBogus(T begin, T end)
1470
@@ -354,7 +354,7 @@ string doSetDnssecLogBogus(T begin, T en
1471
 
1471
 
1472
   if (pdns_iequals(*begin, "on") || pdns_iequals(*begin, "yes")) {
1472
   if (pdns_iequals(*begin, "on") || pdns_iequals(*begin, "yes")) {
1473
     if (!g_dnssecLogBogus) {
1473
     if (!g_dnssecLogBogus) {
Lines 1476-1482 Link Here
1476
       g_dnssecLogBogus = true;
1476
       g_dnssecLogBogus = true;
1477
       return "DNSSEC Bogus logging enabled\n";
1477
       return "DNSSEC Bogus logging enabled\n";
1478
     }
1478
     }
1479
@@ -362,7 +362,7 @@ string doSetDnssecLogBogus(T begin, T end)
1479
@@ -363,7 +363,7 @@ string doSetDnssecLogBogus(T begin, T en
1480
 
1480
 
1481
   if (pdns_iequals(*begin, "off") || pdns_iequals(*begin, "no")) {
1481
   if (pdns_iequals(*begin, "off") || pdns_iequals(*begin, "no")) {
1482
     if (g_dnssecLogBogus) {
1482
     if (g_dnssecLogBogus) {
Lines 1485-1491 Link Here
1485
       g_dnssecLogBogus = false;
1485
       g_dnssecLogBogus = false;
1486
       return "DNSSEC Bogus logging disabled\n";
1486
       return "DNSSEC Bogus logging disabled\n";
1487
     }
1487
     }
1488
@@ -397,7 +397,7 @@ string doAddNTA(T begin, T end)
1488
@@ -398,7 +398,7 @@ string doAddNTA(T begin, T end)
1489
     if (begin != end)
1489
     if (begin != end)
1490
       why += " ";
1490
       why += " ";
1491
   }
1491
   }
Lines 1494-1500 Link Here
1494
   g_luaconfs.modify([who, why](LuaConfigItems& lci) {
1494
   g_luaconfs.modify([who, why](LuaConfigItems& lci) {
1495
       lci.negAnchors[who] = why;
1495
       lci.negAnchors[who] = why;
1496
       });
1496
       });
1497
@@ -412,7 +412,7 @@ string doClearNTA(T begin, T end)
1497
@@ -413,7 +413,7 @@ string doClearNTA(T begin, T end)
1498
     return "No Negative Trust Anchor specified, doing nothing.\n";
1498
     return "No Negative Trust Anchor specified, doing nothing.\n";
1499
 
1499
 
1500
   if (begin + 1 == end && *begin == "*"){
1500
   if (begin + 1 == end && *begin == "*"){
Lines 1503-1509 Link Here
1503
     g_luaconfs.modify([](LuaConfigItems& lci) {
1503
     g_luaconfs.modify([](LuaConfigItems& lci) {
1504
         lci.negAnchors.clear();
1504
         lci.negAnchors.clear();
1505
       });
1505
       });
1506
@@ -440,7 +440,7 @@ string doClearNTA(T begin, T end)
1506
@@ -441,7 +441,7 @@ string doClearNTA(T begin, T end)
1507
   string removed("");
1507
   string removed("");
1508
   bool first(true);
1508
   bool first(true);
1509
   for (auto const &entry : toRemove) {
1509
   for (auto const &entry : toRemove) {
Lines 1512-1518 Link Here
1512
     g_luaconfs.modify([entry](LuaConfigItems& lci) {
1512
     g_luaconfs.modify([entry](LuaConfigItems& lci) {
1513
         lci.negAnchors.erase(entry);
1513
         lci.negAnchors.erase(entry);
1514
       });
1514
       });
1515
@@ -488,17 +488,17 @@ string doAddTA(T begin, T end)
1515
@@ -489,17 +489,17 @@ string doAddTA(T begin, T end)
1516
   }
1516
   }
1517
 
1517
 
1518
   try {
1518
   try {
Lines 1519-1525 Link Here
1519
-    L<<Logger::Warning<<"Adding Trust Anchor for "<<who<<" with data '"<<what<<"', requested via control channel";
1519
-    L<<Logger::Warning<<"Adding Trust Anchor for "<<who<<" with data '"<<what<<"', requested via control channel";
1520
+    g_log<<Logger::Warning<<"Adding Trust Anchor for "<<who<<" with data '"<<what<<"', requested via control channel";
1520
+    g_log<<Logger::Warning<<"Adding Trust Anchor for "<<who<<" with data '"<<what<<"', requested via control channel";
1521
     g_luaconfs.modify([who, what](LuaConfigItems& lci) {
1521
     g_luaconfs.modify([who, what](LuaConfigItems& lci) {
1522
       auto ds = unique_ptr<DSRecordContent>(dynamic_cast<DSRecordContent*>(DSRecordContent::make(what)));
1522
       auto ds=std::dynamic_pointer_cast<DSRecordContent>(DSRecordContent::make(what));
1523
       lci.dsAnchors[who].insert(*ds);
1523
       lci.dsAnchors[who].insert(*ds);
1524
       });
1524
       });
1525
     broadcastAccFunction<uint64_t>(boost::bind(pleaseWipePacketCache, who, true));
1525
     broadcastAccFunction<uint64_t>(boost::bind(pleaseWipePacketCache, who, true));
Lines 1533-1539 Link Here
1533
     return "Unable to add Trust Anchor for " + who.toStringRootDot() + ": " + e.what() + "\n";
1533
     return "Unable to add Trust Anchor for " + who.toStringRootDot() + ": " + e.what() + "\n";
1534
   }
1534
   }
1535
 }
1535
 }
1536
@@ -530,7 +530,7 @@ string doClearTA(T begin, T end)
1536
@@ -531,7 +531,7 @@ string doClearTA(T begin, T end)
1537
   string removed("");
1537
   string removed("");
1538
   bool first(true);
1538
   bool first(true);
1539
   for (auto const &entry : toRemove) {
1539
   for (auto const &entry : toRemove) {
Lines 1542-1548 Link Here
1542
     g_luaconfs.modify([entry](LuaConfigItems& lci) {
1542
     g_luaconfs.modify([entry](LuaConfigItems& lci) {
1543
         lci.dsAnchors.erase(entry);
1543
         lci.dsAnchors.erase(entry);
1544
       });
1544
       });
1545
@@ -900,7 +900,7 @@ RecursorControlParser::RecursorControlParser()
1545
@@ -901,7 +901,7 @@ RecursorControlParser::RecursorControlPa
1546
 
1546
 
1547
 static void doExitGeneric(bool nicely)
1547
 static void doExitGeneric(bool nicely)
1548
 {
1548
 {
Lines 1551-1557 Link Here
1551
   extern RecursorControlChannel s_rcc;
1551
   extern RecursorControlChannel s_rcc;
1552
   s_rcc.~RecursorControlChannel(); 
1552
   s_rcc.~RecursorControlChannel(); 
1553
 
1553
 
1554
@@ -1214,7 +1214,7 @@ string RecursorControlParser::getAnswer(const string& 
1554
@@ -1215,7 +1215,7 @@ string RecursorControlParser::getAnswer(
1555
 
1555
 
1556
     try {
1556
     try {
1557
       loadRecursorLuaConfig(::arg()["lua-config-file"], false);
1557
       loadRecursorLuaConfig(::arg()["lua-config-file"], false);
Lines 1560-1566 Link Here
1560
       return "Reloaded Lua configuration file '"+::arg()["lua-config-file"]+"'\n";
1560
       return "Reloaded Lua configuration file '"+::arg()["lua-config-file"]+"'\n";
1561
     }
1561
     }
1562
     catch(std::exception& e) {
1562
     catch(std::exception& e) {
1563
@@ -1239,7 +1239,7 @@ string RecursorControlParser::getAnswer(const string& 
1563
@@ -1240,7 +1240,7 @@ string RecursorControlParser::getAnswer(
1564
 
1564
 
1565
   if(cmd=="reload-acls") {
1565
   if(cmd=="reload-acls") {
1566
     if(!::arg()["chroot"].empty()) {
1566
     if(!::arg()["chroot"].empty()) {
Lines 1569-1575 Link Here
1569
       return "Unable to reload ACL when chroot()'ed, please restart\n";
1569
       return "Unable to reload ACL when chroot()'ed, please restart\n";
1570
     }
1570
     }
1571
 
1571
 
1572
@@ -1248,12 +1248,12 @@ string RecursorControlParser::getAnswer(const string& 
1572
@@ -1249,12 +1249,12 @@ string RecursorControlParser::getAnswer(
1573
     } 
1573
     } 
1574
     catch(std::exception& e) 
1574
     catch(std::exception& e) 
1575
     {
1575
     {
Lines 1584-1590 Link Here
1584
       return ae.reason + string("\n");
1584
       return ae.reason + string("\n");
1585
     }
1585
     }
1586
     return "ok\n";
1586
     return "ok\n";
1587
@@ -1292,7 +1292,7 @@ string RecursorControlParser::getAnswer(const string& 
1587
@@ -1293,7 +1293,7 @@ string RecursorControlParser::getAnswer(
1588
 
1588
 
1589
   if(cmd=="reload-zones") {
1589
   if(cmd=="reload-zones") {
1590
     if(!::arg()["chroot"].empty()) {
1590
     if(!::arg()["chroot"].empty()) {
Lines 1593-1599 Link Here
1593
       return "Unable to reload zones and forwards when chroot()'ed, please restart\n";
1593
       return "Unable to reload zones and forwards when chroot()'ed, please restart\n";
1594
     }
1594
     }
1595
     return reloadAuthAndForwards();
1595
     return reloadAuthAndForwards();
1596
--- recursor_cache.hh.orig	2017-12-11 10:38:52 UTC
1596
--- recursor_cache.hh.orig	2018-11-06 14:56:58 UTC
1597
+++ recursor_cache.hh
1597
+++ recursor_cache.hh
1598
@@ -30,7 +30,6 @@
1598
@@ -30,7 +30,6 @@
1599
 #include <iostream>
1599
 #include <iostream>
Lines 1611-1619 Link Here
1611
 #include "namespaces.hh"
1611
 #include "namespaces.hh"
1612
 using namespace ::boost::multi_index;
1612
 using namespace ::boost::multi_index;
1613
 
1613
 
1614
--- reczones.cc.orig	2017-12-11 10:38:52 UTC
1614
--- reczones.cc.orig	2018-11-06 14:56:58 UTC
1615
+++ reczones.cc
1615
+++ reczones.cc
1616
@@ -124,10 +124,10 @@ static void makeNameToIPZone(SyncRes::domainmap_t* new
1616
@@ -124,10 +124,10 @@ static void makeNameToIPZone(SyncRes::do
1617
   ad.d_records.insert(dr);
1617
   ad.d_records.insert(dr);
1618
   
1618
   
1619
   if(newMap->count(dr.d_name)) {  
1619
   if(newMap->count(dr.d_name)) {  
Lines 1626-1632 Link Here
1626
     (*newMap)[dr.d_name]=ad;
1626
     (*newMap)[dr.d_name]=ad;
1627
   }
1627
   }
1628
 }
1628
 }
1629
@@ -169,11 +169,11 @@ static void makeIPToNamesZone(SyncRes::domainmap_t* ne
1629
@@ -169,11 +169,11 @@ static void makeIPToNamesZone(SyncRes::d
1630
     }
1630
     }
1631
 
1631
 
1632
   if(newMap->count(dr.d_name)) {  
1632
   if(newMap->count(dr.d_name)) {  
Lines 1640-1646 Link Here
1640
     (*newMap)[dr.d_name]=ad;
1640
     (*newMap)[dr.d_name]=ad;
1641
   }
1641
   }
1642
 }
1642
 }
1643
@@ -218,15 +218,15 @@ void convertServersForAD(const std::string& input, Syn
1643
@@ -218,15 +218,15 @@ void convertServersForAD(const std::stri
1644
 
1644
 
1645
   for(vector<string>::const_iterator iter = servers.begin(); iter != servers.end(); ++iter) {
1645
   for(vector<string>::const_iterator iter = servers.begin(); iter != servers.end(); ++iter) {
1646
     if(verbose && iter != servers.begin()) 
1646
     if(verbose && iter != servers.begin()) 
Lines 1685-1691 Link Here
1685
   }
1685
   }
1686
   return "reloading failed, see log\n";
1686
   return "reloading failed, see log\n";
1687
 }
1687
 }
1688
@@ -325,7 +325,7 @@ void RPZIXFRTracker(const ComboAddress& master, const 
1688
@@ -325,7 +325,7 @@ void RPZIXFRTracker(const ComboAddress& 
1689
 
1689
 
1690
     sleep(refresh);
1690
     sleep(refresh);
1691
     
1691
     
Lines 1694-1700 Link Here
1694
     vector<pair<vector<DNSRecord>, vector<DNSRecord> > > deltas;
1694
     vector<pair<vector<DNSRecord>, vector<DNSRecord> > > deltas;
1695
 
1695
 
1696
     ComboAddress local(localAddress);
1696
     ComboAddress local(localAddress);
1697
@@ -335,12 +335,12 @@ void RPZIXFRTracker(const ComboAddress& master, const 
1697
@@ -335,12 +335,12 @@ void RPZIXFRTracker(const ComboAddress& 
1698
     try {
1698
     try {
1699
       deltas = getIXFRDeltas(master, zone, dr, tt, &local, maxReceivedBytes);
1699
       deltas = getIXFRDeltas(master, zone, dr, tt, &local, maxReceivedBytes);
1700
     } catch(std::runtime_error& e ){
1700
     } catch(std::runtime_error& e ){
Lines 1709-1715 Link Here
1709
 
1709
 
1710
     auto luaconfsCopy = g_luaconfs.getCopy();
1710
     auto luaconfsCopy = g_luaconfs.getCopy();
1711
     int totremove=0, totadd=0;
1711
     int totremove=0, totadd=0;
1712
@@ -348,7 +348,7 @@ void RPZIXFRTracker(const ComboAddress& master, const 
1712
@@ -348,7 +348,7 @@ void RPZIXFRTracker(const ComboAddress& 
1713
       const auto& remove = delta.first;
1713
       const auto& remove = delta.first;
1714
       const auto& add = delta.second;
1714
       const auto& add = delta.second;
1715
       if(remove.empty()) {
1715
       if(remove.empty()) {
Lines 1718-1724 Link Here
1718
         luaconfsCopy.dfe.clear(polZone);
1718
         luaconfsCopy.dfe.clear(polZone);
1719
       }
1719
       }
1720
       for(const auto& rr : remove) { // should always contain the SOA
1720
       for(const auto& rr : remove) { // should always contain the SOA
1721
@@ -360,11 +360,11 @@ void RPZIXFRTracker(const ComboAddress& master, const 
1721
@@ -360,11 +360,11 @@ void RPZIXFRTracker(const ComboAddress& 
1722
 	    //	    cout<<"Got good removal of SOA serial "<<oldsr->d_st.serial<<endl;
1722
 	    //	    cout<<"Got good removal of SOA serial "<<oldsr->d_st.serial<<endl;
1723
 	  }
1723
 	  }
1724
 	  else
1724
 	  else
Lines 1732-1738 Link Here
1732
 	  RPZRecordToPolicy(rr, luaconfsCopy.dfe, false, defpol, polZone);
1732
 	  RPZRecordToPolicy(rr, luaconfsCopy.dfe, false, defpol, polZone);
1733
 	}
1733
 	}
1734
       }
1734
       }
1735
@@ -374,19 +374,19 @@ void RPZIXFRTracker(const ComboAddress& master, const 
1735
@@ -374,19 +374,19 @@ void RPZIXFRTracker(const ComboAddress& 
1736
           continue;
1736
           continue;
1737
 	if(rr.d_type == QType::SOA) {
1737
 	if(rr.d_type == QType::SOA) {
1738
 	  auto newsr = getRR<SOARecordContent>(rr);
1738
 	  auto newsr = getRR<SOARecordContent>(rr);
Lines 1755-1761 Link Here
1755
     g_luaconfs.setState(luaconfsCopy);
1755
     g_luaconfs.setState(luaconfsCopy);
1756
   }
1756
   }
1757
 }
1757
 }
1758
@@ -414,7 +414,7 @@ SyncRes::domainmap_t* parseAuthAndForwards()
1758
@@ -414,7 +414,7 @@ SyncRes::domainmap_t* parseAuthAndForwar
1759
       // headers.first=toCanonic("", headers.first);
1759
       // headers.first=toCanonic("", headers.first);
1760
       if(n==0) {
1760
       if(n==0) {
1761
         ad.d_rdForward = false;
1761
         ad.d_rdForward = false;
Lines 1764-1770 Link Here
1764
         ZoneParserTNG zpt(headers.second, DNSName(headers.first));
1764
         ZoneParserTNG zpt(headers.second, DNSName(headers.first));
1765
         DNSResourceRecord rr;
1765
         DNSResourceRecord rr;
1766
 	DNSRecord dr;
1766
 	DNSRecord dr;
1767
@@ -436,13 +436,13 @@ SyncRes::domainmap_t* parseAuthAndForwards()
1767
@@ -436,13 +436,13 @@ SyncRes::domainmap_t* parseAuthAndForwar
1768
         }
1768
         }
1769
       }
1769
       }
1770
       else {
1770
       else {
Lines 1781-1787 Link Here
1781
         
1781
         
1782
         convertServersForAD(headers.second, ad, ";");
1782
         convertServersForAD(headers.second, ad, ";");
1783
         if(n == 2) {
1783
         if(n == 2) {
1784
@@ -455,7 +455,7 @@ SyncRes::domainmap_t* parseAuthAndForwards()
1784
@@ -455,7 +455,7 @@ SyncRes::domainmap_t* parseAuthAndForwar
1785
   }
1785
   }
1786
   
1786
   
1787
   if(!::arg()["forward-zones-file"].empty()) {
1787
   if(!::arg()["forward-zones-file"].empty()) {
Lines 1790-1796 Link Here
1790
     SyncRes::AuthDomain ad;
1790
     SyncRes::AuthDomain ad;
1791
     FILE *rfp=fopen(::arg()["forward-zones-file"].c_str(), "r");
1791
     FILE *rfp=fopen(::arg()["forward-zones-file"].c_str(), "r");
1792
 
1792
 
1793
@@ -502,7 +502,7 @@ SyncRes::domainmap_t* parseAuthAndForwards()
1793
@@ -502,7 +502,7 @@ SyncRes::domainmap_t* parseAuthAndForwar
1794
 
1794
 
1795
       (*newMap)[DNSName(domain)]=ad;
1795
       (*newMap)[DNSName(domain)]=ad;
1796
     }
1796
     }
Lines 1799-1805 Link Here
1799
   }
1799
   }
1800
 
1800
 
1801
   if(::arg().mustDo("export-etc-hosts")) {
1801
   if(::arg().mustDo("export-etc-hosts")) {
1802
@@ -511,7 +511,7 @@ SyncRes::domainmap_t* parseAuthAndForwards()
1802
@@ -511,7 +511,7 @@ SyncRes::domainmap_t* parseAuthAndForwar
1803
     
1803
     
1804
     ifstream ifs(fname.c_str());
1804
     ifstream ifs(fname.c_str());
1805
     if(!ifs) {
1805
     if(!ifs) {
Lines 1808-1814 Link Here
1808
     }
1808
     }
1809
     else {
1809
     else {
1810
       string searchSuffix = ::arg()["export-etc-hosts-search-suffix"];
1810
       string searchSuffix = ::arg()["export-etc-hosts-search-suffix"];
1811
@@ -543,7 +543,7 @@ SyncRes::domainmap_t* parseAuthAndForwards()
1811
@@ -543,7 +543,7 @@ SyncRes::domainmap_t* parseAuthAndForwar
1812
     }
1812
     }
1813
   }
1813
   }
1814
   if(::arg().mustDo("serve-rfc1918")) {
1814
   if(::arg().mustDo("serve-rfc1918")) {
Lines 1817-1823 Link Here
1817
     parts.clear();
1817
     parts.clear();
1818
     parts.push_back("127");
1818
     parts.push_back("127");
1819
     makeIPToNamesZone(newMap, parts);
1819
     makeIPToNamesZone(newMap, parts);
1820
--- remote_logger.cc.orig	2017-12-11 10:38:52 UTC
1820
--- remote_logger.cc.orig	2018-11-06 14:56:58 UTC
1821
+++ remote_logger.cc
1821
+++ remote_logger.cc
1822
@@ -21,7 +21,7 @@ bool RemoteLogger::reconnect()
1822
@@ -21,7 +21,7 @@ bool RemoteLogger::reconnect()
1823
   }
1823
   }
Lines 1837-1845 Link Here
1837
 #else
1837
 #else
1838
       vinfolog("Error sending data to remote logger (%s): %s", d_remote.toStringWithPort(), e.what());
1838
       vinfolog("Error sending data to remote logger (%s): %s", d_remote.toStringWithPort(), e.what());
1839
 #endif
1839
 #endif
1840
--- rpzloader.cc.orig	2017-12-11 10:38:52 UTC
1840
--- rpzloader.cc.orig	2018-11-06 14:56:58 UTC
1841
+++ rpzloader.cc
1841
+++ rpzloader.cc
1842
@@ -159,9 +159,9 @@ void RPZRecordToPolicy(const DNSRecord& dr, DNSFilterE
1842
@@ -159,9 +159,9 @@ void RPZRecordToPolicy(const DNSRecord& 
1843
 
1843
 
1844
 shared_ptr<SOARecordContent> loadRPZFromServer(const ComboAddress& master, const DNSName& zone, DNSFilterEngine& target, boost::optional<DNSFilterEngine::Policy> defpol, size_t place, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress)
1844
 shared_ptr<SOARecordContent> loadRPZFromServer(const ComboAddress& master, const DNSName& zone, DNSFilterEngine& target, boost::optional<DNSFilterEngine::Policy> defpol, size_t place, const TSIGTriplet& tt, size_t maxReceivedBytes, const ComboAddress& localAddress)
1845
 {
1845
 {
Lines 1851-1857 Link Here
1851
 
1851
 
1852
   ComboAddress local(localAddress);
1852
   ComboAddress local(localAddress);
1853
   if (local == ComboAddress())
1853
   if (local == ComboAddress())
1854
@@ -189,11 +189,11 @@ shared_ptr<SOARecordContent> loadRPZFromServer(const C
1854
@@ -189,11 +189,11 @@ shared_ptr<SOARecordContent> loadRPZFrom
1855
       nrecords++;
1855
       nrecords++;
1856
     } 
1856
     } 
1857
     if(last != time(0)) {
1857
     if(last != time(0)) {
Lines 1865-1871 Link Here
1865
   return sr;
1865
   return sr;
1866
 }
1866
 }
1867
 
1867
 
1868
--- secpoll-recursor.cc.orig	2017-12-11 10:38:52 UTC
1868
--- secpoll-recursor.cc.orig	2018-11-06 14:56:58 UTC
1869
+++ secpoll-recursor.cc
1869
+++ secpoll-recursor.cc
1870
@@ -53,7 +53,7 @@ void doSecPoll(time_t* last_secpoll)
1870
@@ -53,7 +53,7 @@ void doSecPoll(time_t* last_secpoll)
1871
   }
1871
   }
Lines 1899-1905 Link Here
1899
+    g_log<<Logger::Error<<"PowerDNS Security Update Mandatory: "<<g_security_message<<endl;
1899
+    g_log<<Logger::Error<<"PowerDNS Security Update Mandatory: "<<g_security_message<<endl;
1900
   }
1900
   }
1901
 }
1901
 }
1902
--- syncres.cc.orig	2017-12-11 10:38:52 UTC
1902
--- syncres.cc.orig	2018-11-06 14:56:58 UTC
1903
+++ syncres.cc
1903
+++ syncres.cc
1904
@@ -78,7 +78,7 @@ unsigned int SyncRes::s_maxdepth;
1904
@@ -78,7 +78,7 @@ unsigned int SyncRes::s_maxdepth;
1905
 string SyncRes::s_serverID;
1905
 string SyncRes::s_serverID;
Lines 1910-1918 Link Here
1910
 
1910
 
1911
 bool SyncRes::s_noEDNS;
1911
 bool SyncRes::s_noEDNS;
1912
 
1912
 
1913
--- unix_utility.cc.orig	2017-12-11 10:38:52 UTC
1913
--- unix_utility.cc.orig	2018-11-06 14:56:58 UTC
1914
+++ unix_utility.cc
1914
+++ unix_utility.cc
1915
@@ -85,22 +85,22 @@ void Utility::setBindAny(int af, sock_t sock)
1915
@@ -85,22 +85,22 @@ void Utility::setBindAny(int af, sock_t 
1916
   (void) one; // avoids 'unused var' warning on systems that have none of the defines checked below
1916
   (void) one; // avoids 'unused var' warning on systems that have none of the defines checked below
1917
 #ifdef IP_FREEBIND
1917
 #ifdef IP_FREEBIND
1918
   if (setsockopt(sock, IPPROTO_IP, IP_FREEBIND, &one, sizeof(one)) < 0)
1918
   if (setsockopt(sock, IPPROTO_IP, IP_FREEBIND, &one, sizeof(one)) < 0)
Lines 1939-1945 Link Here
1939
 #endif
1939
 #endif
1940
 }
1940
 }
1941
 
1941
 
1942
@@ -129,22 +129,22 @@ void Utility::dropGroupPrivs( int uid, int gid )
1942
@@ -129,22 +129,22 @@ void Utility::dropGroupPrivs( int uid, i
1943
 {
1943
 {
1944
   if(gid) {
1944
   if(gid) {
1945
     if(setgid(gid)<0) {
1945
     if(setgid(gid)<0) {
Lines 1981-1987 Link Here
1981
   }
1981
   }
1982
 }
1982
 }
1983
 
1983
 
1984
@@ -189,7 +189,7 @@ int Utility::makeGidNumeric(const string &group)
1984
@@ -189,7 +189,7 @@ int Utility::makeGidNumeric(const string
1985
     errno=0;
1985
     errno=0;
1986
     struct group *gr=getgrnam(group.c_str());
1986
     struct group *gr=getgrnam(group.c_str());
1987
     if(!gr) {
1987
     if(!gr) {
Lines 1990-1996 Link Here
1990
       exit(1);
1990
       exit(1);
1991
     }
1991
     }
1992
     newgid=gr->gr_gid;
1992
     newgid=gr->gr_gid;
1993
@@ -205,7 +205,7 @@ int Utility::makeUidNumeric(const string &username)
1993
@@ -205,7 +205,7 @@ int Utility::makeUidNumeric(const string
1994
   if(!(newuid=atoi(username.c_str()))) {
1994
   if(!(newuid=atoi(username.c_str()))) {
1995
     struct passwd *pw=getpwnam(username.c_str());
1995
     struct passwd *pw=getpwnam(username.c_str());
1996
     if(!pw) {
1996
     if(!pw) {
Lines 1999-2005 Link Here
1999
       exit(1);
1999
       exit(1);
2000
     }
2000
     }
2001
     newuid=pw->pw_uid;
2001
     newuid=pw->pw_uid;
2002
--- validate-recursor.cc.orig	2017-12-11 10:38:52 UTC
2002
--- validate-recursor.cc.orig	2018-11-06 14:56:58 UTC
2003
+++ validate-recursor.cc
2003
+++ validate-recursor.cc
2004
@@ -6,7 +6,7 @@
2004
@@ -6,7 +6,7 @@
2005
 DNSSECMode g_dnssecmode{DNSSECMode::ProcessNoValidate};
2005
 DNSSECMode g_dnssecmode{DNSSECMode::ProcessNoValidate};
Lines 2010-2016 Link Here
2010
 
2010
 
2011
 class SRRecordOracle : public DNSRecordOracle
2011
 class SRRecordOracle : public DNSRecordOracle
2012
 {
2012
 {
2013
--- validate.cc.orig	2017-12-11 10:38:52 UTC
2013
--- validate.cc.orig	2018-11-06 14:56:58 UTC
2014
+++ validate.cc
2014
+++ validate.cc
2015
@@ -6,7 +6,7 @@
2015
@@ -6,7 +6,7 @@
2016
 #include "logger.hh"
2016
 #include "logger.hh"
Lines 2021-2027 Link Here
2021
 void dotEdge(DNSName zone, string type1, DNSName name1, string tag1, string type2, DNSName name2, string tag2, string color="");
2021
 void dotEdge(DNSName zone, string type1, DNSName name1, string tag1, string type2, DNSName name2, string tag2, string color="");
2022
 void dotNode(string type, DNSName name, string tag, string content);
2022
 void dotNode(string type, DNSName name, string tag, string content);
2023
 string dotName(string type, DNSName name, string tag);
2023
 string dotName(string type, DNSName name, string tag);
2024
--- version.cc.orig	2017-12-11 10:38:52 UTC
2024
--- version.cc.orig	2018-11-06 14:56:58 UTC
2025
+++ version.cc
2025
+++ version.cc
2026
@@ -72,22 +72,22 @@ string productTypeApiType() {
2026
@@ -72,22 +72,22 @@ string productTypeApiType() {
2027
 
2027
 
Lines 2065-2071 Link Here
2065
 #undef escape_quotes
2065
 #undef escape_quotes
2066
 #undef double_escape
2066
 #undef double_escape
2067
 #endif
2067
 #endif
2068
--- webserver.cc.orig	2017-12-11 10:38:52 UTC
2068
--- webserver.cc.orig	2018-11-06 14:56:58 UTC
2069
+++ webserver.cc
2069
+++ webserver.cc
2070
@@ -43,12 +43,12 @@ json11::Json HttpRequest::json()
2070
@@ -43,12 +43,12 @@ json11::Json HttpRequest::json()
2071
 {
2071
 {
Lines 2082-2088 Link Here
2082
     throw HttpBadRequestException();
2082
     throw HttpBadRequestException();
2083
   }
2083
   }
2084
   return doc;
2084
   return doc;
2085
@@ -136,13 +136,13 @@ static void apiWrapper(WebServer::HandlerFunction hand
2085
@@ -136,13 +136,13 @@ static void apiWrapper(WebServer::Handle
2086
   resp->headers["access-control-allow-origin"] = "*";
2086
   resp->headers["access-control-allow-origin"] = "*";
2087
 
2087
 
2088
   if (api_key.empty()) {
2088
   if (api_key.empty()) {
Lines 2098-2104 Link Here
2098
     throw HttpUnauthorizedException("X-API-Key");
2098
     throw HttpUnauthorizedException("X-API-Key");
2099
   }
2099
   }
2100
 
2100
 
2101
@@ -185,7 +185,7 @@ static void webWrapper(WebServer::HandlerFunction hand
2101
@@ -185,7 +185,7 @@ static void webWrapper(WebServer::Handle
2102
   if (!web_password.empty()) {
2102
   if (!web_password.empty()) {
2103
     bool auth_ok = req->compareAuthorization(web_password);
2103
     bool auth_ok = req->compareAuthorization(web_password);
2104
     if (!auth_ok) {
2104
     if (!auth_ok) {
Lines 2107-2113 Link Here
2107
       throw HttpUnauthorizedException("Basic");
2107
       throw HttpUnauthorizedException("Basic");
2108
     }
2108
     }
2109
   }
2109
   }
2110
@@ -216,11 +216,11 @@ void WebServer::handleRequest(HttpRequest& req, HttpRe
2110
@@ -216,11 +216,11 @@ void WebServer::handleRequest(HttpReques
2111
 
2111
 
2112
   try {
2112
   try {
2113
     if (!req.complete) {
2113
     if (!req.complete) {
Lines 2121-2127 Link Here
2121
 
2121
 
2122
     YaHTTP::strstr_map_t::iterator header;
2122
     YaHTTP::strstr_map_t::iterator header;
2123
 
2123
 
2124
@@ -235,33 +235,33 @@ void WebServer::handleRequest(HttpRequest& req, HttpRe
2124
@@ -235,33 +235,33 @@ void WebServer::handleRequest(HttpReques
2125
 
2125
 
2126
     YaHTTP::THandlerFunction handler;
2126
     YaHTTP::THandlerFunction handler;
2127
     if (!YaHTTP::Router::Route(&req, handler)) {
2127
     if (!YaHTTP::Router::Route(&req, handler)) {
Lines 2217-2225 Link Here
2217
   }
2217
   }
2218
   exit(1);
2218
   exit(1);
2219
 }
2219
 }
2220
--- ws-recursor.cc.orig	2017-12-11 10:38:52 UTC
2220
--- ws-recursor.cc.orig	2018-11-06 14:56:58 UTC
2221
+++ ws-recursor.cc
2221
+++ ws-recursor.cc
2222
@@ -597,7 +597,7 @@ void AsyncWebServer::serveConnection(Socket *client)
2222
@@ -597,7 +597,7 @@ void AsyncWebServer::serveConnection(Soc
2223
 
2223
 
2224
   // now send the reply
2224
   // now send the reply
2225
   if (asendtcp(data, client) == -1 || data.empty()) {
2225
   if (asendtcp(data, client) == -1 || data.empty()) {

Return to bug 233141