+Changes since 2.9.1:
+ - removed debugging output from the webserver (found by Paul Wouters)
+ - due to Solaris portability fixes, qtypes>127 were broken.
+ These include NAPTR, ANY and AXFR. The upshot is that powerdns
+ wasn't performing outgoing AXFRs nor ANY queries. These were the
+ 'question for type -1' warnings in the log
+
+ - pdns/pdns now has a +x by default (suggested by Paul Wouters)
+ - bug in documentation (pgmysqlbackend != pgmysql backend) (Paul Wouters)
+
+ - Red Hat has weird location for pgsql includes (Paul Wouters)
+
+ - incoming AXFR could theoretically miss some trailing records
+ (not observed, but could happen)
+
+ - with some remotes, an incoming AXFR would not terminate until a
+ timeout occured.
+
+ - incoming AXFR did not support TXT records (spotted by Paul Wouters)
+
+ - added xdb
+
+ - dynamic modules work again!
+
+ - openbsd compiles but crashes at startup
+
Changes since 2.9:
- 'set' no longer allows setting non-existent variables
- added db2 backend to distribution
EXTRA_DIST=TODO WARNING README HACKING INSTALL ChangeLog debian pdns.spec
install-exec-local:
+ -@chmod +x pdns/pdns
@echo "***********************************************************"
@echo
@echo An init.d startup script has been made for you in pdns/pdns
To add multiple modules, try:
-$ ./configure --with-modules="mysql mypgsql" --enable-mysql --enable-pgsql
+$ ./configure --with-modules="mysql pgmysql" --enable-mysql --enable-pgsql
See http://rtfm.powerdns.com/compiling-powerdns.html for more details.
bugs:
- bind backend ANY queries don't work
+fixed bind backend ANY queries don't work
+fixed records of unknown type are reported as -1?
+fixed pdns/pdns should be +x
+ pdns.conf-dist contains old descriptions
+ redhat does not find postgresql includes by default
+ redhat does not find postgresql libraries by default
+
immediate issues:
make install installs libraries with a static build which it should
dnl intro
AC_INIT(pdns/receiver.cc)
-AM_INIT_AUTOMAKE(pdns, 2.9.1)
+AM_INIT_AUTOMAKE(pdns, 2.9.2)
AC_CANONICAL_HOST
AM_CONFIG_HEADER(config.h)
AC_C_BIGENDIAN
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(gethostname gettimeofday mkdir mktime select socket strerror)
-#AC_CHECK_LIB(resolv, inet_ntop)
-
-#dnl AC_MSG_NOTICE([Looking in libraries: $LIBS])
-
-#AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop))
-#AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton))
-
-
-#
# Check for libdl
-#
my_save_LIBS="$LIBS"
LIBS=""
LIBS="$my_save_LIBS"
AC_SUBST(LIBDL)
+AC_MSG_CHECKING([for RTLD_NOW]);
+ac_save_LIBS="$LIBS"
+LIBS="$LIBS $LIBDL"
+AC_TRY_LINK(
+[#include <dlfcn.h>],
+[ (void) dlopen("",RTLD_NOW); ],
+has_RTLD_NOW=yes, has_RTLD_NOW=no)
+AC_MSG_RESULT([$has_RTLD_NOW])
+if test "$has_RTLD_NOW" = "no"
+then
+ AC_DEFINE(NEED_RTLD_NOW,,[If host OS misses RTLD_NOW])
+fi
+LIBS=$ac_save_LIBS
+
# pthread_create is in standard libraries (As in BSDI 3.0)
AC_MSG_CHECKING("for pthread_create in -libc");
AC_TRY_LINK(
LDFLAGS="-pthread $LDFLAGS"
CXXFLAGS="-pthread -D_GNU_SOURCE $CXXFLAGS"
;;
+openbsd*)
+ AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
+ DYNLINKFLAGS="-rdynamic"
+ LDFLAGS="-lc_r $LDFLAGS"
+ CXXFLAGS="-pthread $CXXFLAGS"
+ ;;
*)
AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
DYNLINKFLAGS="-rdynamic"
modules="$withval"
])
+dynmodules="pipe"
+AC_ARG_WITH(dynmodules, [ --with-dynmodules Which userbases to build for dynamic loading ],
+[
+ dynmodules="$withval"
+])
+
+
AC_SUBST(socketdir)
socketdir="/var/run"
AC_SUBST(moduleobjects)
AC_SUBST(modulelibs)
-for a in $modules
+for a in $modules $dynmodules
do
case "$a" in
pgmysql )
if test -z "$MYSQL_libdir"; then
AC_MSG_ERROR([Didn't find the mysql library dir in '$MYSQL_lib_check'])
fi
- case "$MYSQL_libdir" in
+ case "$MYSQL_libdir" in
/usr/lib ) MYSQL_lib="" ;;
/* ) MYSQL_lib=-L$MYSQL_libdir; LDFLAGS="$MYSQL_lib $LDFLAGS";;
* ) AC_MSG_ERROR([The MySQL library directory ($MYSQL_libdir) must be an absolute path.]) ;;
esac
- AC_SUBST(MYSQL_lib)
+
+ AC_SUBST(MYSQL_lib)
+
AC_MSG_RESULT([$MYSQL_libdir])
AC_MSG_CHECKING([for MySQL include directory])
MYSQL_incdir=
if test -z "$MYSQL_incdir"; then
AC_MSG_ERROR([Didn't find the mysql include dir in '$MYSQL_inc_check'])
fi
- case "$MYSQL_incdir" in
+
+ case "$MYSQL_incdir" in
/* ) ;;
* ) AC_MSG_ERROR([The MySQL include directory ($MYSQL_incdir) must be an absolute path.]) ;;
esac
- AC_SUBST(MYSQL_incdir)
+
+ AC_SUBST(MYSQL_incdir)
AC_MSG_RESULT([$MYSQL_incdir])
- LIBS="$LIBS -lmysqlclient"
+# LIBS="$LIBS -lmysqlclient"
fi
[PGSQL_lib_check="$withval/lib/pgsql $with_pgsql/lib"
PGSQL_inc_check="$withval/include/pgsql"],
[PGSQL_lib_check="/usr/local/pgsql/lib/pgsql /usr/local/lib/pgsql /opt/pgsql/lib/pgsql /usr/lib/pgsql /usr/local/pgsql/lib /usr/local/lib /opt/pgsql/lib /usr/lib"
- PGSQL_inc_check="/usr/local/pgsql/include/pgsql /usr/local/include/postgresql/ /usr/local/include /opt/pgsql/include/pgsql /opt/pgsql/include /usr/include/postgresql"])
+ PGSQL_inc_check="/usr/local/pgsql/include/pgsql /usr/local/include/postgresql/ /usr/local/include /opt/pgsql/include/pgsql /opt/pgsql/include /usr/include/pgsql/ /usr/include/postgresql"])
AC_ARG_WITH(pgsql-lib,
[ --with-pgsql-lib=<path> directory path of PgSQL library installation],
[PGSQL_lib_check="$withval/lib/pgsql $withval/pgsql $withval"])
/* ) PGSQL_lib=-L$PGSQL_libdir; LDFLAGS="$PGSQL_lib $LDFLAGS";;
* ) AC_MSG_ERROR([The PgSQL library directory ($PGSQL_libdir) must be an absolute path.]) ;;
esac
- AC_SUBST(PGSQL_lib)
+
+ AC_SUBST(PGSQL_lib)
AC_MSG_RESULT([$PGSQL_libdir])
AC_MSG_CHECKING([for PgSQL include directory])
PGSQL_incdir=
AC_SUBST(PGSQL_incdir)
AC_MSG_RESULT([$PGSQL_incdir])
- LIBS="$LIBS -lpq++ -lpq -lssl -lcrypt -lcrypto"
+# LIBS="$LIBS -lpq++ -lpq -lssl -lcrypt -lcrypto"
fi
case "$a" in
pgmysql)
- rm -f $srcdir/modules/pgmysqlbackend/OBJECTFILES
- cat /dev/null > $srcdir/modules/pgmysqlbackend/OBJECTLIBS
+ rm -f $srcdir/modules/pgmysqlbackend/OBJECTFILES $srcdir/modules/pgmysqlbackend/OBJECTLIBS
+
echo gmysqlbackend.o > $srcdir/modules/pgmysqlbackend/OBJECTFILES
if test -n "$domysql"
then
echo smysql.o >> $srcdir/modules/pgmysqlbackend/OBJECTFILES
+ echo -lmysql >> $srcdir/modules/pgmysqlbackend/OBJECTLIBS
fi
if test -n "$dopgsql"
then
echo spgsql.o >> $srcdir/modules/pgmysqlbackend/OBJECTFILES
+ echo -lpq++ -lpq -lssl -lcrypt -lcrypto >> $srcdir/modules/pgmysqlbackend/OBJECTLIBS
fi
;;
esac
done
modulelibs="$modulelibs `cat $srcdir/modules/${a}backend/OBJECTLIBS`"
done
+
+for a in $dynmodules
+do
+ moduledirs="$moduledirs ${a}backend"
+done
+
export moduledirs moduleobjects modulelibs
AC_OUTPUT(Makefile modules/Makefile pdns/Makefile pdns/codedocs/Makefile \
pdns/backends/Makefile pdns/backends/bind/Makefile pdns/pdns \
modules/mysqlbackend/Makefile modules/pdnsbackend/Makefile \
modules/pgmysqlbackend/Makefile modules/db2backend/Makefile \
-modules/pipebackend/Makefile modules/oraclebackend/Makefile)
+modules/pipebackend/Makefile modules/oraclebackend/Makefile \
+modules/xdbbackend/Makefile)
+pdns (2.9.2-1) unstable; urgency=low
+
+ * upstream updates
+
+ -- bert hubert <bert@powerdns.com> Wed, 11 Dec 2002 15:04:52 +0100
+
pdns (2.9-1) unstable; urgency=low
* Initial packaging
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, libstdc++-dev
+Build-Depends: automake1.5, autoconf, libtool, flex, bison, docbook-utils, libmysqlclient10-dev, postgresql-dev
Package: pdns
Architecture: any
how to install and configure it as well as how to write
new backend modules.
-Package: pdns-backend-bind
+Package: pdns-backend-pipe
Architecture: any
Depends: pdns (= ${dpkg:Version}), ${shlibs:Depends}
Provides: pdns-backend
-Description: bind backend for pDNS
- This package contains the bind backend for the PowerDNS nameserver. This
- allows pDNS to use the configuration and zone files from the ISC bind
- nameserver.
+Description: pipe/coprocess backend for pDNS
+ This package contains the pipe backend for the PowerDNS nameserver. This
+ allows PowerDNS to retrieve domain info from a process that accepts
+ questions on stdin and returns answers on stdout.
Package: pdns-backend-mysql
Architecture: any
Description: MySQL backend for pDNS
This package contains a MySQL backend for the PowerDNS nameserver.
+Package: pdns-backend-pgmysql
+Architecture: any
+Depends: pdns (= ${dpkg:Version}), ${shlibs:Depends}
+Provides: pdns-backend
+Description: Generic PostgreSQL and MySQL backend for pDNS
+ This package contains a generic PostgreSQL and MySQL backend
+ for the PowerDNS nameserver. It has configurable SQL statements.
+
+Package: pdns-backend-xdb
+Architecture: any
+Depends: pdns (= ${dpkg:Version}), ${shlibs:Depends}
+Provides: pdns-backend
+Description: XDB/tdb/gdb backend for pDNS
+ This package contains a table backend for PowerDNS. Currently includes TDB,
+ the Trivial Database or Tridgell Database.
+
+Package: pdns-backend-oracle
+Architecture: any
+Depends: pdns (= ${dpkg:Version}), ${shlibs:Depends}
+Provides: pdns-backend
+Description: Oracle backend for pDNS
+ This package contains a generic Oracle backend for PowerDNS.
+
-/etc/pdns.conf
+/etc/powerdns/pdns.conf
/etc/init.d/pdns
#!/usr/bin/make -f
tmpdir := $(shell pwd)/debian/tmp
-backends := bind mysql
+backends := mysql pipe xdb pgmysql oracle
configure:
./bootstrap
./configure \
--prefix=/usr \
--libexecdir='$${prefix}/lib' \
- --sysconfdir=/etc \
+ --libdir='$${prefix}/lib/powerdns' \
+ --sysconfdir=/etc/powerdns \
--infodir='$${datadir}/info' \
- --mandir='$${datadir}/man'
+ --mandir='$${datadir}/man' \
+ --with-dynmodules="$(backends)" \
+ --with-modules=""
make
touch build-main
"$(tmpdir)"/usr/bin/zone2sql \
"$(tmpdir)"/usr/sbin/pdns_server \
"$(tmpdir)"/usr/bin/pdns_control
- mv "$(tmpdir)"/etc/pdns.conf-dist "$(tmpdir)"/etc/pdns.conf
+ mv "$(tmpdir)"/etc/powerdns/pdns.conf-dist "$(tmpdir)"/etc/powerdns/pdns.conf
install -d -m 755 -o root -g root "$(tmpdir)"/etc/init.d
install -p -m 755 -o root -g root pdns/pdns \
dpkg --build "$(tmpdir)" ..
-build-backend: configure
- if [ -e build-main ] ; then make distclean ; fi
- rm -f build-main
-
- ./configure \
- --prefix=/usr \
- --libexecdir='$${prefix}/lib' \
- --sysconfdir=/etc \
- --infodir='$${datadir}/info' \
- --mandir='$${datadir}/man' \
- --enable-pgsql \
- --enable-mysql \
- --with-modules="mysql pgmysql"
- make
- touch build-backend
-
-
-binary-backend: build-backend
+binary-backend: build-main
rm -f debian/substvars
rm -rf "$(tmpdir)" "$(tmpdir)"-*
make DESTDIR="$(tmpdir)" install
strip --remove-section=.comment --remove-section=.note \
- --strip-unneeded "$(tmpdir)"/usr/lib/*.so
- chmod 644 "$(tmpdir)"/usr/lib/*
+ --strip-unneeded "$(tmpdir)"/usr/lib/powerdns/*.so
+ chmod 644 "$(tmpdir)"/usr/lib/powerdns/*
set -e ; for be in $(backends) ; do \
rm -f debian/substvars ; \
pkg=pdns-backend-$$be ; \
- install -d -m 755 -o root -g root "$(tmpdir)"-$$be/usr/lib ; \
- mv "$(tmpdir)"/usr/lib/*$$be* "$(tmpdir)"-$$be/usr/lib/ ; \
+ install -d -m 755 -o root -g root "$(tmpdir)"-$$be/usr/lib/powerdns ; \
+ mv "$(tmpdir)"/usr/lib/powerdns/lib$$be* "$(tmpdir)"-$$be/usr/lib/powerdns ; \
install -d -m 755 -o root -g root "$(tmpdir)"-$$be/usr/share/doc ; \
ln -s pdns "$(tmpdir)"-$$be/usr/share/doc/$$pkg ; \
\
"$(tmpdir)"-$$be/DEBIAN/postinst ; \
install -p -m 755 -o root -g root debian/pdns-backend-general.postrm \
"$(tmpdir)"-$$be/DEBIAN/postrm ; \
- dpkg-shlibdeps "$(tmpdir)"-$$be/usr/lib/*.so ; \
+ dpkg-shlibdeps "$(tmpdir)"-$$be/usr/lib/powerdns/*.so ; \
dpkg-gencontrol -isp -p$$pkg -P"$(tmpdir)"-$$be ; \
dpkg --build "$(tmpdir)"-$$be .. ; \
done
-distclean:
- rm -f *.o *.so *~ *.d deps Makefile
-
-clean:
- rm -f *.o *.so *~ *.d deps
-
PDNS_HOME = ../../pdns
-PDNS_LIBDIR = /usr/lib/powerdns
+PDNS_LIBDIR = @libdir@
MYSQL_INCLUDES = @MYSQL_incdir@
MYSQL_LIB = @MYSQL_lib@
PGSQL_INCLUDES = @PGSQL_incdir@
PGSQL_LIB = @PGSQL_lib@
-PGSQL_LIBS = -Wl,-Bstatic -lpq++ -lpq -Wl,-Bdynamic -lssl -lcrypt -lcrypto
+PGSQL_LIBS = -Wl,-Bstatic -lpq++ -lpq -Wl,-Bdynamic -lssl -lcrypt -lcrypto
INCLUDES=-I$(PDNS_HOME) -I../..
ifneq ($(domysql),)
TARGETS:=$(TARGETS) smysql.o
CXXFLAGS:=-DPDNS_DOMYSQL -I$(MYSQL_INCLUDES) $(CXXFLAGS)
- ELIBS:=$(MYGRES_LIB) $(MYGRES_LIBS) $(ELIBS)
+ ELIBS:=$(MYSQL_LIB) $(MYSQL_LIBS) $(ELIBS)
endif
+all: libpgmysqlbackend.so gmysqlbackend.o $(TARGETS) OBJECTFILES
-all: gmysqlbackend.o $(TARGETS) OBJECTFILES
+distclean:
+ rm -f *.o *.so *~ *.d deps Makefile
-OBJECTFILES:
- echo $(TARGETS) > OBJECTFILES
+clean:
+ rm -f *.o *.so *~ *.d deps
-OBJECTLIBS:
- echo $(ELIBS) > OBJECTLIBS
PACKAGE = @PACKAGE@
.cc.o:
g++ -MD -g -c $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $<
+libpgmysqlbackend.so: $(TARGETS) gmysqlbackend.o
+ g++ -shared $^ $(ELIBS) -o $@
+mkinstalldirs = $(SHELL) @top_srcdir@/mkinstalldirs
+prefix=@prefix@
install:
+ $(mkinstalldirs) $(DESTDIR)@libdir@
+ install -s libpgmysqlbackend.so $(DESTDIR)@libdir@
## File : Makefile
## Author : Stefan Arentz
## Project : PowerDNS
-## Version : $Id: Makefile.in,v 1.1 2002/12/10 13:36:26 ahu Exp $
+## Version : $Id: Makefile.in,v 1.2 2002/12/12 19:53:19 ahu Exp $
##
ORACLE_HOME = /opt/oracle
INCLUDE = -I$(ORACLE_HOME)/rdbms/demo \
-I$(ORACLE_HOME)/rdbms/public \
-I$(PDNS_HOME) -I../..
-VERSION=2.1
-all: oraclebackend.o
-
-install:
+ORACLE_DYN_LIBS = -L/opt/oracle/lib -lclntsh
+all: liboraclebackend.so oraclebackend.o
PACKAGE = @PACKAGE@
VERSION = @VERSION@
+
DISTFILES=*.cc *.hh Makefile.in OBJECTFILES OBJECTLIBS
top_distdir = ../..
clean:
rm -f *.o *.so *~
+
+
+liboraclebackend.so: oraclebackend.o
+ g++ -shared $^ -Wl,-rpath,$(ORACLE_HOME)/lib -L$(ORACLE_HOME)/lib $(ORACLE_DYN_LIBS) -o $@
+
+mkinstalldirs = $(SHELL) @top_srcdir@/mkinstalldirs
+
+prefix=@prefix@
+install: liboraclebackend.so
+ $(mkinstalldirs) $(DESTDIR)@libdir@
+ install -s liboraclebackend.so $(DESTDIR)@libdir@
+
EXTRA_DIST=OBJECTFILES OBJECTLIBS
lib_LTLIBRARIES = libpipebackend.la
-
libpipebackend_la_SOURCES=pipebackend.cc pipebackend.hh coprocess.cc coprocess.hh
+libpipebackend_la_LDFLAGS=-module
+++ /dev/null
-
-PDNS_HOME = ../../
-XDB_LIBS = -Wl,-Bstatic -lgdbm -ltdb -Wl,-Bdynamic
-VERSION = 2.6
-
-all: libxdbbackend.so
-
-CPPFLAGS=-I$(PDNS_HOME) -O3 -pthread
-
-LIBS= $(XDB_LIBS)
-DIRNAME=pdns-xdbbackend-$(VERSION)
-
-dist:
- mkdir $(DIRNAME)
- cp pgsqlbackend.cc pgsqlbackend.hh Makefile $(DIRNAME)
- tar cvzf $(DIRNAME).tar.gz $(DIRNAME)
- rm -rf $(DIRNAME)
-
-xdb-fill: xdb-fill.o xgdbm.o xtdb.o
- g++ xdb-fill.o xgdbm.o xtdb.o $(XDB_LIBS) -o xdb-fill
-
-libxdbbackend.so: xdbbackend.o xtdb.o
- g++ xdbbackend.o $(XDB_LIBS) -shared -o libxdbbackend.so
-
-.cc.o:
- g++ -MD -g -c $(CXXFLAGS) $(CPPFLAGS) $<
-
-clean:
- rm -f *.o *.so *~ *.d
-
--- /dev/null
+XDB_LIBS = -ltdb
+PDNS_HOME = ../../pdns
+INCLUDES = -I$(PDNS_HOME) -I../..
+CXXFLAGS = @CXXFLAGS@
+
+all: xdb-fill xdbbackend.o xtdb.o libxdbbackend.so
+
+xdb-fill: xdb-fill.o xtdb.o
+ g++ $^ $(XDB_LIBS) -o xdb-fill
+
+distclean: clean
+
+clean:
+ rm -f *.o *.so *~ *.d
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+DISTFILES=*.cc *.hh Makefile.in OBJECTFILES OBJECTLIBS
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+
+.cc.o:
+ g++ -MD -g -c $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $<
+
+libxdbbackend.so: xdbbackend.o xtdb.o
+ g++ -shared $^ $(XDB_LIBS) -o $@
+
+mkinstalldirs = $(SHELL) @top_srcdir@/mkinstalldirs
+
+prefix=@prefix@
+install:
+ $(mkinstalldirs) $(DESTDIR)@libdir@
+ install -s libxdbbackend.so $(DESTDIR)@libdir@
+
--- /dev/null
+xdbbackend.o xtdb.o
#include "pdns/utility.hh"
-#include "pdns/xgdbm.hh"
-#include "pdns/xtdb.hh"
+#include "xgdbm.hh"
+#include "xtdb.hh"
#include "pdns/ahuexception.hh"
#include "pdns/logger.hh"
+#include <stdio.h>
#include <sstream>
#include <iostream>
-AM_CXXFLAGS=-DSYSCONFDIR=\"@sysconfdir@\" -DBINDIR=\"@bindir@\" -DLOCALSTATEDIR=\"@socketdir@\" -Ibackends/bind
+AM_CXXFLAGS=-DSYSCONFDIR=\"@sysconfdir@\" -DLIBDIR=\"@libdir@\" -DLOCALSTATEDIR=\"@socketdir@\" -Ibackends/bind
AM_CPPFLAGS=-Ibackends/bind
EXTRA_DIST = codedocs/Makefile codedocs/doxygen.conf docs/Makefile \
INCLUDES=-I../..
-lib_LTLIBRARIES = libbindbackend.la
+noinst_LTLIBRARIES = libbindbackend.la
libbindbackend_la_SOURCES=bindbackend.cc bindbackend.hh bindparser.yy \
bindlexer.l zoneparser2.cc ../../misc.cc huffman.cc huffman.hh zoneparser.hh \
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "utility.hh"\r
+#include "utility.hh"
#include "dnsbackend.hh"
#include "arguments.hh"
#include "ueberbackend.hh"
}
void BackendMakerClass::load_all()
-{\r
- // TODO: Implement this?\r
+{
+ // TODO: Implement this?
#ifndef WIN32
DIR *dir=opendir(arg()["module-dir"].c_str());
if(!dir) {
struct dirent *entry;
while((entry=readdir(dir))) {
if(!strncmp(entry->d_name,"lib",3) &&
- entry->d_name[strlen(entry->d_name)-1]=='o' &&
- entry->d_name[strlen(entry->d_name)-2]=='s' &&
- entry->d_name[strlen(entry->d_name)-3]=='.')
+ strlen(entry->d_name)>13 &&
+ !strcmp(entry->d_name+strlen(entry->d_name)-10,"backend.so"))
load(entry->d_name);
}
- closedir(dir);\r
+ closedir(dir);
#endif // WIN32
}
res=UeberBackend::loadmodule(arg()["module-dir"]+"/"+module);
if(res==false) {
- L<<Logger::Error<<"Unable to load module "<<module<<endl;
+ L<<Logger::Error<<"dnsbackend unable to load module in "<<module<<endl;
exit(1);
}
}
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-// $Id: dnspacket.cc,v 1.4 2002/12/11 11:03:01 ahu Exp $
+// $Id: dnspacket.cc,v 1.5 2002/12/12 19:53:19 ahu Exp $
#include "utility.hh"
#include <cstdio>
case QType::TXT:
- rr.content.assign(datapos+offset+2,(int)(256*datapos[offset] + datapos[offset+1]));
+ rr.content.assign(datapos+offset+1,(int)datapos[offset]);
break;
case QType::CNAME:
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-// $Id: dnspacket.hh,v 1.4 2002/12/09 16:24:17 ahu Exp $
+// $Id: dnspacket.hh,v 1.5 2002/12/12 19:53:19 ahu Exp $
#ifndef DNSPACKET_HH
#define DNSPACKET_HH
d_qlen=offset+4; // this points to the start of any answers
}
- qtype=stringbuffer[12+offset]*256+stringbuffer[13+offset];
- qclass=stringbuffer[14+offset]*256+stringbuffer[15+offset];
+ qtype=((unsigned char)stringbuffer[12+offset])*256+(unsigned char)stringbuffer[13+offset];
+ qclass=((unsigned char)stringbuffer[14+offset]*256)+(unsigned char)stringbuffer[15+offset];
return 0;
}
</affiliation>
</author>
- <PubDate>v2.1 $Date: 2002/12/10 13:36:26 $</PubDate>
+ <PubDate>v2.1 $Date: 2002/12/12 19:53:20 $</PubDate>
<Abstract>
<para>
Before proceeding, it is advised to check the release notes for your PDNS version, as specified in the name of the distribution
file.
</para>
+ <sect2 id="changelog-2-9-2"><title>Version 2.9.2</title>
+ <para>
+ Bugfixes galore. Solaris porting created some issues on all platforms. Bugs fixed:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ Silly debugging output removed from the webserver (found by Paul Wouters)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ SEVERE: due to Solaris portability fixes, qtypes<127 were broken.
+ These include NAPTR, ANY and AXFR. The upshot is that powerdns
+ wasn't performing outgoing AXFRs nor ANY queries. These were the
+ 'question for type -1' warnings in the log
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ incoming AXFR could theoretically miss some trailing records (not observed, but could happen)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ incoming AXFR did not support TXT records (spotted by Paul Wouters)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ with some remotes, an incoming AXFR would not terminate until a
+ timeout occured (observed by Paul Wouters)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Documentation bug, pgmysql != mypgsql
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Features:
+ <itemizedlist>
+ <listitem>
+ <para>
+ pdns init.d script is now +x by default
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Mysterious xdb backend added - see <xref linkend="xdbbackend">.
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect2>
+
+
<sect2 id="changelog-2-9-1"><title>Version 2.9.1</title>
<para>
Thanks to the great enthusiasm from around the world, powerdns is now available for Solaris and FreeBSD users again!
<para>
Heap of Solaris work (with help from Edvard Tuinder, Stefan Van Steen, Koos van den Hout, Roel van der Made and
especially Mark Bakker).
- Now compiles in 2.7 and 2.8. May be a bit dysfunctional on 2.7 though - it won't do IPv6 and it won't serve AAAA. Patches
+ Now compiles in 2.7 and 2.8, haven't tried 2.9. May be a bit dysfunctional on 2.7 though - it won't do IPv6 and it won't serve AAAA. Patches
welcome!
</para>
</listitem>
</listitem>
<listitem>
<para>
- Removal of bzero and other less portable constructs. Discovered that recent Linux glibc's need -D_GNU_SOURCE (Wichert Akkerman).
- </para>
+ Removal of bzero and other less portable constructs. Discovered that recent Linux glibc's need -D_GNU_SOURCE (Wichert Akkerman). </para>
</listitem>
</itemizedlist>
</para>
</Chapter>
<Chapter id="installing-on-unix">
-<Title>Installing on Unix</Title>
-
-<Para>
-After unpacking the PDNS distribution the files need to be moved to
-appropriate locations.
-</Para>
-
-<Para>
-PDNS can be installed in a variety of directories, which can easily be
-customised to local policy. Two ways are available - manual and via a menu.
-</Para>
-
-<Para>
-The menu is invoked by executing the './choosepaths' script and answering the
-questions. The manual way involves editing the 'pathconfig' file. The choice
-is up to you.
-</Para>
-
-<Para>
-After deciding paths, change to root and execute the 'installer' script.
-This will:
- <itemizedlist>
- <listitem>
- <para>Configure the PowerDNS binary so it knows where the configuration directory is</para>
- </listitem>
- <listitem>
- <para>If necessary, create the configuration directory</para>
- </listitem>
- <listitem>
- <para>Write sample configuration file (not overwriting existing one)</para>
- </listitem>
- <listitem>
- <para>Write a SysV-style init.d script in the configured directory</para>
- </listitem>
- <listitem>
- <para>Move binaries and libraries to the configured places</para>
- </listitem>
- </itemizedlist>
- </Para>
-
+ <Title>Installing on Unix</Title>
+ <para>
+ You will typically install PDNS > 2.9 via source or via a package. Earlier versions used a clumsy binary installer.
+ </para>
<sect1 id="problems">
<title>Possible problems at this point</title>
<para>
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><errortype>Multiple IP addresses on your server, PDNS sending out answers on the wrong one</errortype></term>
+ <term><errortype>Massive amounts of 'recvfrom gave error, ignoring: Connection refused'</errortype></term>
+ <listitem>
+ <para>
+ If you have multiple IP addresses on the internet on one machine, UNIX often sends out answers over another interface
+ than which the packet came in on. In such cases, use <command>local-address</command> to bind to specific IP addresses, which
+ can be comma separated. The second error comes from remotes disregarding answers to questions it didn't ask to that IP address
+ and sending back ICMP errors.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
</para></listitem></varlistentry>
<varlistentry><term>local-address=...</term>
<listitem><para>
- Local IP address to which we bind. You can specify multiple addresses separated by commas or whitespace.
+ Local IP address to which we bind. You can specify multiple addresses separated by commas or whitespace. It is highly
+ advised to bind to specific interfaces and not use the default 'bind to any'. This causes big problems if you have multiple
+ IP addresses. Unix does not provide a way of figuring out what IP address a packet was sent to when binding to any.
</para></listitem></varlistentry>
<varlistentry><term>local-port=...</term>
<listitem><para>
The ODBC backend has been tested with Microsoft Access, MySQL (via MyODBC) and Microsoft SQLServer. As the SQL statements used are very basic,
it is expected to work with many ODBC drivers.
</para>
- </sect1>
-
-</appendix>
+ </sect1>
+ <sect1 id="xdbbackend"><Title>XDB Backend</title>
+ <para>
+ Special purpose backend for grandiose performance. Can talk to Tridge's Trivial Database, or to regular *db tables on disk. Currently only sparsely
+ documented. Very useful if you need to do >50.000 queries/second, which we actually measured on the .ORG zone.
+ </para>
+ <para>
+ More documentation will follow.
+ </para>
+ </sect1>
+ </appendix>
<appendix id="pdns-internals"><title>PDNS internals</title>
<para>
PDNS is normally launched by the init.d script but is actually a binary called <filename>pdns_server</filename>. This
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-// $Id: receiver.cc,v 1.2 2002/12/06 09:58:03 ahu Exp $
+// $Id: receiver.cc,v 1.3 2002/12/12 19:53:19 ahu Exp $
#include <cstdio>
#include <signal.h>
#include <cstring>
#include "dynhandler.hh"
#include "communicator.hh"
#include "dnsproxy.hh"
-#include "utility.hh"\r
+#include "utility.hh"
#include "common_startup.hh"
time_t s_starttime;
arg().set("config-name","Name of this virtual configuration - will rename the binary image")="";
arg().set("socket-dir","Where the controlsocket will live")=LOCALSTATEDIR;
- arg().set("module-dir","Default directory for modules")=BINDIR+string("/../lib");
+ arg().set("module-dir","Default directory for modules")=LIBDIR;
arg().set("chroot","If set, chroot to this directory for more security")="";
arg().set("logging-facility","Log under a specific facility")="";
arg().set("daemon","Operate as a daemon")="no";
res=UeberBackend::loadmodule(arg()["module-dir"]+"/"+module);
if(res==false) {
- L<<Logger::Error<<"Unable to load module "<<module<<endl;
+ L<<Logger::Error<<"receiver unable to load module "<<module<<endl;
exit(1);
}
}
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "utility.hh"\r
+#include "utility.hh"
#include "resolver.hh"
#include <pthread.h>
#include <semaphore.h>
{
d_sock=-1;
d_timeout=500000;
+ d_soacount=0;
d_buf=new unsigned char[66000];
}
int Resolver::axfrChunk(Resolver::res_t &res)
{
+ if(d_soacount>1) {
+ Utility::closesocket(d_sock);
+ d_sock=-1;
+ return 0;
+ }
+
// d_sock is connected and is about to spit out a packet
int len=getLength();
if(len<0)
timeoutReadn((char *)d_buf,len);
d_len=len;
+
res=result();
- if(!res.empty())
- if(res.begin()->qtype.getCode()==QType::SOA || res.end()->qtype.getCode()==QType::SOA)
+ for(res_t::const_iterator i=res.begin();i!=res.end();++i)
+ if(i->qtype.getCode()==QType::SOA) {
d_soacount++;
+ }
- if(d_soacount==2) {
- Utility::closesocket(d_sock);
- d_sock=-1;
- return 0;
- }
+ if(d_soacount>1 && !res.empty()) // chop off the last SOA
+ res.resize(res.size()-1);
+
return 1;
}
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-// $Id: ueberbackend.cc,v 1.3 2002/12/09 18:34:45 ahu Exp $
+// $Id: ueberbackend.cc,v 1.4 2002/12/12 19:53:20 ahu Exp $
/* (C) Copyright 2002 PowerDNS.COM BV */
#include "utility.hh"
+#include "config.h"
#include <string>
#include <map>
#include <sys/types.h>
int UeberBackend::s_s=-1; // ?
+#ifdef NEED_RTLD_NOW
+#define RTLD_NOW RTLD_LAZY
+#endif
+
//! Loads a module and reports it to all UeberBackend threads
bool UeberBackend::loadmodule(const string &name)
{
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "utility.hh"\r
+#include "utility.hh"
#include "webserver.hh"
#include "session.hh"
#include "misc.hh"
else
varmap[parts[0]]="";
- L<<"'"<<parts[0]<<"' = '"<<varmap[parts[0]]<<"'"<<endl;
}
bool authOK=0;