|
Changed |
_service:tar_scm:pdns-3.1.tar
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/README
^
|
@@ -1,4 +1,4 @@
-PowerDNS is copyright 2012 by PowerDNS.COM BV
+PowerDNS is copyright 2012 by PowerDNS.COM BV & lots of contributors
This file may lag behind at times. For most recent updates, always check
http://doc.powerdns.com/changelog.html and http://wiki.powerdns.com
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/modules/gmysqlbackend/gmysqlbackend.cc
^
|
@@ -1,4 +1,4 @@
-// $Id: gmysqlbackend.cc 2770 2012-10-06 10:58:38Z ahu $
+// $Id: gmysqlbackend.cc 2800 2012-10-11 09:52:07Z ahu $
#include <string>
#include <map>
@@ -35,7 +35,7 @@
L<<Logger::Error<<mode<<" Connection failed: "<<e.txtReason()<<endl;
throw AhuException("Unable to launch "+mode+" connection: "+e.txtReason());
}
- L<<Logger::Warning<<mode<<" Connection successful"<<endl;
+ L<<Logger::Info<<mode<<" Connection successful"<<endl;
}
class gMySQLFactory : public BackendFactory
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/pdns/backends/bind/zone2sql.cc
^
|
@@ -64,7 +64,10 @@
else
a+=*i;
}
- return "'"+a+"'";
+ if(g_mode == POSTGRES)
+ return "E'"+a+"'";
+ else
+ return "'"+a+"'";
}
static void startNewTransaction()
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/pdns/backends/gsql/gsqlbackend.cc
^
|
@@ -16,7 +16,7 @@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-// $Id: gsqlbackend.cc 2732 2012-10-03 17:21:21Z peter $
+// $Id: gsqlbackend.cc 2803 2012-10-11 13:46:07Z peter $
#ifdef WIN32
# pragma warning ( disable: 4786 )
#endif // WIN32
@@ -327,7 +327,12 @@
snprintf(output, sizeof(output)-1, d_setOrderAuthQuery.c_str(), sqlEscape(ordername).c_str(), auth, sqlEscape(qname).c_str(), domain_id);
// cerr<<"sql: '"<<output<<"'\n";
- d_db->doCommand(output);
+ try {
+ d_db->doCommand(output);
+ }
+ catch(SSqlException &e) {
+ throw AhuException("GSQLBackend unable to update ordername/auth for domain_id "+itoa(domain_id)+": "+e.txtReason());
+ }
return true;
}
@@ -338,7 +343,12 @@
char output[1024];
snprintf(output, sizeof(output)-1, d_nullifyOrderNameQuery.c_str(), domain_id, sqlEscape(qname).c_str());
- d_db->doCommand(output);
+ try {
+ d_db->doCommand(output);
+ }
+ catch(SSqlException &e) {
+ throw AhuException("GSQLBackend unable to nullify ordername for domain_id "+itoa(domain_id)+": "+e.txtReason());
+ }
return true;
}
@@ -349,7 +359,12 @@
char output[1024];
snprintf(output, sizeof(output)-1, d_nullifyOrderNameAndAuthQuery.c_str(), sqlEscape(qname).c_str(), sqlEscape(type).c_str(), domain_id);
- d_db->doCommand(output);
+ try {
+ d_db->doCommand(output);
+ }
+ catch(SSqlException &e) {
+ throw AhuException("GSQLBackend unable to nullify ordername/auth for domain_id "+itoa(domain_id)+": "+e.txtReason());
+ }
return true;
}
@@ -414,7 +429,13 @@
snprintf(output, sizeof(output)-1, d_afterOrderQuery.c_str(), sqlEscape(lcqname).c_str(), id);
- d_db->doQuery(output);
+ try {
+ d_db->doQuery(output);
+ }
+ catch(SSqlException &e) {
+ throw AhuException("GSQLBackend unable to find before/after (after) for domain_id "+itoa(id)+": "+e.txtReason());
+ }
+
while(d_db->getRow(row)) {
after=row[0];
}
@@ -422,14 +443,24 @@
if(after.empty() && !lcqname.empty()) {
snprintf(output, sizeof(output)-1, d_firstOrderQuery.c_str(), id);
- d_db->doQuery(output);
+ try {
+ d_db->doQuery(output);
+ }
+ catch(SSqlException &e) {
+ throw AhuException("GSQLBackend unable to find before/after (first) for domain_id "+itoa(id)+": "+e.txtReason());
+ }
while(d_db->getRow(row)) {
after=row[0];
}
}
snprintf(output, sizeof(output)-1, d_beforeOrderQuery.c_str(), sqlEscape(lcqname).c_str(), id);
- d_db->doQuery(output);
+ try {
+ d_db->doQuery(output);
+ }
+ catch(SSqlException &e) {
+ throw AhuException("GSQLBackend unable to find before/after (before) for domain_id "+itoa(id)+": "+e.txtReason());
+ }
while(d_db->getRow(row)) {
before=row[0];
unhashed=row[1];
@@ -442,7 +473,12 @@
}
snprintf(output, sizeof(output)-1, d_lastOrderQuery.c_str(), id);
- d_db->doQuery(output);
+ try {
+ d_db->doQuery(output);
+ }
+ catch(SSqlException &e) {
+ throw AhuException("GSQLBackend unable to find before/after (last) for domain_id "+itoa(id)+": "+e.txtReason());
+ }
while(d_db->getRow(row)) {
before=row[0];
unhashed=row[1];
@@ -836,7 +872,7 @@
d_db->doCommand(output.c_str());
}
catch (SSqlException &e) {
- throw AhuException(e.txtReason());
+ throw AhuException("GSQLBackend unable to feed record: "+e.txtReason());
}
return true; // XXX FIXME this API should not return 'true' I think -ahu
}
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/pdns/common_startup.cc
^
|
@@ -136,6 +136,8 @@
::arg().set("entropy-source", "If set, read entropy from this file")="/dev/urandom";
::arg().set("lua-prequery-script", "Lua script with prequery handler")="";
+
+ ::arg().setSwitch("traceback-handler","Enable the traceback handler (Linux only)")="yes";
}
void declareStats(void)
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/pdns/docs/pdns.xml
^
|
@@ -101,7 +101,8 @@
</note>
<para>
This is a stability and confirmity update to 3.1. It mostly makes our DNSSEC implementation more robust,
- and improves interoperability with various validators.
+ and improves interoperability with various validators. 3.2 has received very extensive testing on a lot
+ of edge cases, verifying output both against common validators and compared against other authoritative servers.
</para>
<para>
DNSSEC changes in 3.2:
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/pdns/nameserver.cc
^
|
@@ -174,8 +174,9 @@
if(IsAnyAddress(locala)) {
int val=1;
- setsockopt(s, IPPROTO_IP, GEN_IP_PKTINFO, &val, sizeof(val));
- setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &val, sizeof(val));
+ setsockopt(s, IPPROTO_IP, GEN_IP_PKTINFO, &val, sizeof(val)); // linux supports this, so why not - might fail on other systems
+ setsockopt(s, IPPROTO_IPV6, IPV6_RECVPKTINFO, &val, sizeof(val));
+ setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &val, sizeof(val)); // if this fails, we report an error in tcpreceiver too
}
if(::bind(s, (sockaddr*)&locala, sizeof(locala))<0) {
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/pdns/pdns.conf-dist
^
|
@@ -360,6 +360,11 @@
# tcp-control-secret=
#################################
+# traceback-handler Enable the traceback handler (Linux only)
+#
+# traceback-handler=yes
+
+#################################
# trusted-notification-proxy IP address of incoming notification proxy
#
# trusted-notification-proxy=
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/pdns/receiver.cc
^
|
@@ -466,7 +466,17 @@
// we really need to do work - either standalone or as an instance
-
+
+#ifdef __linux__
+ if(!::arg().mustDo("traceback-handler")) {
+ L<<Logger::Warning<<"Disabling traceback handler"<<endl;
+ signal(SIGSEGV,SIG_DFL);
+ signal(SIGFPE,SIG_DFL);
+ signal(SIGABRT,SIG_DFL);
+ signal(SIGILL,SIG_DFL);
+ }
+#endif
+
seedRandom(::arg()["entropy-source"]);
loadModules();
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/pdns/slavecommunicator.cc
^
|
@@ -578,13 +578,9 @@
BOOST_FOREACH(val_t& val, sdomains) {
DomainInfo& di(val.di);
// might've come from the packethandler
- if(!di.backend)
- {
- if(!B->getDomainInfo(di.zone, di))
- {
- L<<Logger::Warning<<"Ignore domain "<< di.zone<<" since it has been removed from our backend"<<endl;
- continue;
- }
+ if(!di.backend && !B->getDomainInfo(di.zone, di)) {
+ L<<Logger::Warning<<"Ignore domain "<< di.zone<<" since it has been removed from our backend"<<endl;
+ continue;
}
if(!ssr.d_freshness.count(di.id))
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/pdns/tcpreceiver.cc
^
|
@@ -194,6 +194,7 @@
static void proxyQuestion(shared_ptr<DNSPacket> packet)
{
int sock=socket(AF_INET, SOCK_STREAM, 0);
+
Utility::setCloseOnExec(sock);
if(sock < 0)
throw NetworkError("Error making TCP connection socket to recursor: "+stringerror());
@@ -822,7 +823,7 @@
for(vector<string>::const_iterator laddr=locals.begin();laddr!=locals.end();++laddr) {
int s=socket(AF_INET,SOCK_STREAM,0);
Utility::setCloseOnExec(s);
-
+
if(s<0)
throw AhuException("Unable to acquire TCP socket: "+stringerror());
@@ -833,7 +834,7 @@
L<<Logger::Error<<"Setsockopt failed"<<endl;
exit(1);
}
-
+
if(::bind(s, (sockaddr*)&local, local.getSocklen())<0) {
L<<Logger::Error<<"binding to TCP socket: "<<strerror(errno)<<endl;
throw AhuException("Unable to bind to TCP socket");
@@ -867,7 +868,9 @@
L<<Logger::Error<<"Setsockopt failed"<<endl;
exit(1);
}
-
+ if(setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &tmp, sizeof(tmp)) < 0) {
+ L<<Logger::Error<<"Failed to set IPv6 socket to IPv6 only, continuing anyhow: "<<strerror(errno)<<endl;
+ }
if(bind(s, (const sockaddr*)&local, local.getSocklen())<0) {
L<<Logger::Error<<"binding to TCP socket: "<<strerror(errno)<<endl;
throw AhuException("Unable to bind to TCPv6 socket");
|
[-]
[+]
|
Changed |
pdns-3.1.tar.gz/regression-tests/start-test-stop
^
|
@@ -123,7 +123,7 @@
$RUNWRAPPER ../pdns/pdns_server --daemon=no --local-port=$port --socket-dir=./ \
--no-shuffle --launch=gmysql \
- --fancy-records --send-root-referral \
+ --master --send-root-referral \
--cache-ttl=0 --no-config \
--gmysql-dbname="$GMYSQLDB" \
--gmysql-user="$GMYSQLUSER" \
|