- added --version
- clean up some parameter descriptions
- cleanups by Norbert (getAuth moved to chopOff, arguments 'contains' massive cleanup)
+ - improved reporting to which addresses we bind (now always mentions
+ IP addresses)
+ - added delegation-only feature
+ - some Debian fixes
changes since 2.9.10:
- pdns_recursor now cleans its cache
+pdns (2.9.11-2) unstable; urgency=low
+
+ * Remove automake build-depends and bootstrap rule from debian/rules.
+ This makes pdns a bit more portable across Debian releases.
+ Closes: Bug#205990
+ * Try to remove the /etc/powerdns directory on purge. Closes: Bug#209051
+ * Use libmysqlclient-dev instead of libmysqlclient10-dev
+
+ -- Wichert Akkerman <wakkerma@debian.org> Tue, 9 Sep 2003 14:59:46 +0200
+
pdns (2.9.11-1) unstable; urgency=low
* New upstream release
Priority: extra
Standards-Version: 3.5.8
Maintainer: Wichert Akkerman <wakkerma@debian.org>
-Build-Depends: automake1.5, autoconf, libtool, flex, bison, docbook-utils, libmysqlclient10-dev, postgresql-dev, tdb-dev, libgdbm-dev, libpqpp-dev, libldap2-dev
+Build-Depends: autoconf, libtool, flex, bison, docbook-utils, libmysqlclient-dev, postgresql-dev, tdb-dev, libgdbm-dev, libpqpp-dev, libldap2-dev
Package: pdns
Architecture: any
if [ "$1" = "purge" ] ; then
update_init
+ rmdir /etc/powerdns || true
fi
backends := ldap mysql pipe xdb gmysql gpgsql
debs := ldap mysql pipe xdb pgsql
-configure:
- ./bootstrap
-
binary-doc:
-make -C pdns/docs html/index.html
binary-main: stamp-build binary-main-prepare
- dpkg-gencontrol -isp -ppdns -P"$(tmpdir)"
- dpkg --build "$(tmpdir)" ..
dpkg-shlibdeps "$(tmpdir)"/usr/bin/zone2sql \
"$(tmpdir)"/usr/sbin/pdns_server \
"$(tmpdir)"/usr/bin/pdns_control
+ dpkg-gencontrol -isp -ppdns -P"$(tmpdir)"
+ dpkg --build "$(tmpdir)" ..
binary-static: stamp-build-static binary-main-prepare
bool ArgvMap::contains(const string &var, const string &val)
{
- vector<string> parts;
- vector<string>::const_iterator i;
-
-
- stringtok( parts, params[var], ", \t" );
- for( i = parts.begin(); i != parts.end(); i++ )
- {
- if( *i == val ) {
- return true;
- }
- }
+ vector<string> parts;
+ vector<string>::const_iterator i;
+
+ stringtok( parts, params[var], ", \t" );
+ for( i = parts.begin(); i != parts.end(); i++ ) {
+ if( *i == val ) {
+ return true;
+ }
+ }
- return false;
+ return false;
}
if(of)
of<<getpid()<<endl;
else
- L<<Logger::Error<<"Requested to write pid for "<<getpid()<<" to "<<fname<<"failed: "<<strerror(errno)<<endl;
+ L<<Logger::Error<<"Requested to write pid for "<<getpid()<<" to "<<fname<<" failed: "<<strerror(errno)<<endl;
}
void init(void)
arg().set("quiet","Suppress logging of questions and answers")="off";
arg().set("config-dir","Location of configuration directory (recursor.conf)")=SYSCONFDIR;
arg().set("socket-dir","Where the controlsocket will live")=LOCALSTATEDIR;
+ arg().set("delegation-only","Which domains we only accept delegations from")="";
arg().setCmd("help","Provide a helpful message");
L.toConsole(Logger::Warning);
arg().laxParse(argc,argv); // do a lax parse
arg().parse(argc,argv);
+ arg().set("delegation-only")=toLower(arg()["delegation-only"]);
+
if(arg().mustDo("help")) {
cerr<<"syntax:"<<endl<<endl;
cerr<<arg().helpstring(arg()["help"])<<endl;
makeServerSocket();
makeTCPServerSocket();
+
+
char data[1500];
struct sockaddr_in fromaddr;
for(LWRes::res_t::const_iterator i=result.begin();i!=result.end();++i) {
LOG<<prefix<<qname<<": accept answer '"<<i->qname<<"|"<<i->qtype.getName()<<"|"<<i->content<<"' from '"<<auth<<"' nameservers? ";
- if(endsOn(i->qname, auth)) {
- LOG<<"YES!"<<endl;
- DNSResourceRecord rr=*i;
- rr.d_place=DNSResourceRecord::ANSWER;
- rr.ttl+=time(0);
- // rr.ttl=time(0)+10+10*rr.qtype.getCode();
- tcache[toLower(i->qname)+"|"+i->qtype.getName()].insert(rr);
- }
+ if(endsOn(i->qname, auth)) {
+ if(aabit && d_lwr.d_rcode==RCode::NoError && i->d_place==DNSResourceRecord::ANSWER && arg().contains("delegation-only",auth)) {
+ LOG<<"NO! Is from delegation-only zone"<<endl;
+ return RCode::NXDomain;
+ }
+ else {
+ LOG<<"YES!"<<endl;
+
+ DNSResourceRecord rr=*i;
+ rr.d_place=DNSResourceRecord::ANSWER;
+ rr.ttl+=time(0);
+ // rr.ttl=time(0)+10+10*rr.qtype.getCode();
+ tcache[toLower(i->qname)+"|"+i->qtype.getName()].insert(rr);
+ }
+ }
else
LOG<<"NO!"<<endl;
}