[-]
[+]
|
Added |
pdns-recursor.changes
|
|
[-]
[+]
|
Added |
pdns-recursor.spec
^
|
|
[-]
[+]
|
Added |
pdns-recursor-3.1.3-strip.patch
^
|
@@ -0,0 +1,13 @@
+--- Makefile
++++ Makefile
+@@ -54,10 +54,8 @@
+ install: all
+ -mkdir -p $(DESTDIR)/$(SBINDIR)
+ mv pdns_recursor $(DESTDIR)/$(SBINDIR)
+- strip $(DESTDIR)/$(SBINDIR)/pdns_recursor
+ mkdir -p $(DESTDIR)/$(BINDIR)
+ mv rec_control $(DESTDIR)/$(BINDIR)
+- strip $(DESTDIR)/$(BINDIR)/rec_control
+ -mkdir -p $(DESTDIR)/$(CONFIGDIR)
+ $(DESTDIR)/$(SBINDIR)/pdns_recursor --config > $(DESTDIR)/$(CONFIGDIR)/recursor.conf-dist
+ -mkdir -p $(DESTDIR)/usr/share/man/man1
|
[-]
[+]
|
Added |
pdns-recursor-3.1.4_atomicity.patch
^
|
@@ -0,0 +1,24 @@
+Index: recursor_cache.cc
+===================================================================
+--- recursor_cache.cc.orig 2006-11-12 17:56:13.000000000 +0100
++++ recursor_cache.cc 2007-02-27 21:44:27.347571093 +0100
+@@ -9,9 +9,17 @@ using namespace std;
+ using namespace boost;
+
+ #include "config.h"
+-
+-#ifdef GCC_SKIP_LOCKING
++#if !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)) && defined(GCC_SKIP_LOCKING)
++#warning "using the optimized locking code on older gcc"
++#if HAVE_BITS_ATOMICITY_H
+ #include <bits/atomicity.h>
++#endif
++/*
++this is just a reminder. in gcc 4.2 it seems atomicity.h was moved under ext/
++#if HAVE_EXT_ATOMICITY_H
++#include <ext/atomicity.h>
++#endif
++*/
+ // This code is ugly but does speedup the recursor tremendously on multi-processor systems, and even has a large effect (20, 30%) on uniprocessor
+ namespace __gnu_cxx
+ {
|
[-]
[+]
|
Added |
pdns-recursor-3.1.4_char_casting.patch
^
|
@@ -0,0 +1,53 @@
+------------------------------------------------------------------------
+r964 | ahu | 2007-02-27 20:49:45 +0100 (Tue, 27 Feb 2007) | 3 lines
+Changed paths:
+ M /trunk/pdns/pdns/qtype.cc
+ M /trunk/pdns/pdns/qtype.hh
+ M /trunk/pdns/pdns/sstuff.hh
+
+some const char* correctness disocovered by darix on recent g++ snapshots
+
+
+------------------------------------------------------------------------
+Index: qtype.hh
+===================================================================
+--- qtype.hh (revision 963)
++++ qtype.hh (revision 964)
+@@ -76,7 +76,7 @@
+ private:
+ short int code;
+ typedef pair<string,int> namenum;
+- void insert(char *p, int n);
++ void insert(const char *p, int n);
+
+ static vector<namenum> names;
+ static bool uninit;
+Index: sstuff.hh
+===================================================================
+--- sstuff.hh (revision 963)
++++ sstuff.hh (revision 964)
+@@ -24,9 +24,9 @@
+ class NetworkError : public runtime_error
+ {
+ public:
+- NetworkError(string why="Network Error") : runtime_error(why.c_str())
++ NetworkError(const string& why="Network Error") : runtime_error(why.c_str())
+ {}
+- NetworkError(char *why="Network Error") : runtime_error(why)
++ NetworkError(const char *why="Network Error") : runtime_error(why)
+ {}
+ };
+
+Index: qtype.cc
+===================================================================
+--- qtype.cc (revision 963)
++++ qtype.cc (revision 964)
+@@ -29,7 +29,7 @@
+ bool QType::uninit=true;
+ vector<QType::namenum> QType::names;
+
+-void QType::insert(char *p, int n)
++void QType::insert(const char *p, int n)
+ {
+ names.push_back(make_pair(string(p),n));
+ }
|
[-]
[+]
|
Added |
pdns-recursor-3.1.4_config.patch
^
|
@@ -0,0 +1,12 @@
+Index: config.h
+===================================================================
+--- config.h.orig
++++ config.h
+@@ -1,5 +1,5 @@
+-#define SYSCONFDIR "/etc/powerdns/"
+-#define LOCALSTATEDIR "/var/run/"
++#define SYSCONFDIR "/etc/pdns/"
++#define LOCALSTATEDIR "/var/run/pdns/"
+ #define VERSION "3.1.4"
+ #define RECURSOR
+ #ifndef WIN32
|
[-]
[+]
|
Added |
pdns-recursor-3.1.4_gcc43.patch
^
|
@@ -0,0 +1,108 @@
+Index: misc.hh
+===================================================================
+--- misc.hh.orig 2006-11-12 17:56:13.000000000 +0100
++++ misc.hh 2007-10-19 00:28:15.997410772 +0200
+@@ -37,6 +37,7 @@
+ #include <deque>
+ #include <stdexcept>
+ #include <string>
++#include <cstring>
+ #include <ctype.h>
+ #include <vector>
+ #include <boost/optional.hpp>
+Index: rec_channel.cc
+===================================================================
+--- rec_channel.cc.orig 2006-11-12 17:56:13.000000000 +0100
++++ rec_channel.cc 2007-10-19 00:28:20.737698292 +0200
+@@ -1,6 +1,7 @@
+ #include "rec_channel.hh"
+ #include <sys/socket.h>
+ #include <cerrno>
++#include <cstdlib>
+ #include <unistd.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+Index: sstuff.hh
+===================================================================
+--- sstuff.hh.orig 2007-10-19 00:30:59.000000000 +0200
++++ sstuff.hh 2007-10-19 00:32:45.513717523 +0200
+@@ -189,12 +189,14 @@ public:
+ struct sockaddr_in remote;
+ socklen_t remlen=sizeof(remote);
+ int bytes;
+- if((bytes=recvfrom(d_socket, d_buffer, d_buflen, 0, (sockaddr *)&remote, &remlen))<0)
+- if(errno!=EAGAIN)
++ if((bytes=recvfrom(d_socket, d_buffer, d_buflen, 0, (sockaddr *)&remote, &remlen))<0) {
++ if(errno!=EAGAIN) {
+ throw NetworkError(strerror(errno));
+- else
++ }
++ else {
+ return false;
+-
++ };
++ };
+ dgram.assign(d_buffer,bytes);
+ ep.address.byte=remote.sin_addr.s_addr;
+ ep.port=ntohs(remote.sin_port);
+Index: pdns_recursor.cc
+===================================================================
+--- pdns_recursor.cc.orig 2006-11-12 17:56:13.000000000 +0100
++++ pdns_recursor.cc 2007-10-19 00:36:02.829657414 +0200
+@@ -410,7 +410,7 @@ void primeHints(void)
+ set<DNSResourceRecord>nsset;
+
+ if(::arg()["hint-file"].empty()) {
+- static char*ips[]={"198.41.0.4", "192.228.79.201", "192.33.4.12", "128.8.10.90", "192.203.230.10", "192.5.5.241", "192.112.36.4", "128.63.2.53",
++ static const char*ips[]={"198.41.0.4", "192.228.79.201", "192.33.4.12", "128.8.10.90", "192.203.230.10", "192.5.5.241", "192.112.36.4", "128.63.2.53",
+ "192.36.148.17","192.58.128.30", "193.0.14.129", "198.32.64.12", "202.12.27.33"};
+ DNSResourceRecord arr, nsrr;
+ arr.qtype=QType::A;
+Index: dns.hh
+===================================================================
+--- dns.hh.orig 2007-10-19 00:30:59.000000000 +0200
++++ dns.hh 2007-10-19 00:49:13.749505869 +0200
+@@ -115,7 +115,7 @@ struct EDNS0Record
+ #pragma pack (pop)
+ #endif
+
+-typedef enum {
++enum {
+ ns_t_invalid = 0, /* Cookie. */
+ ns_t_a = 1, /* Host address. */
+ ns_t_ns = 2, /* Authoritative server. */
+@@ -137,7 +137,7 @@ typedef enum {
+ ns_t_afsdb = 18, /* AFS cell database. */
+ ns_t_x25 = 19, /* X_25 calling address. */
+ ns_t_isdn = 20, /* ISDN calling address. */
+- ns_t_rt = 21, /* Router. */
++ ns_t_rt = 21, /* Router. */
+ ns_t_nsap = 22, /* NSAP address. */
+ ns_t_nsap_ptr = 23, /* Reverse NSAP lookup (deprecated). */
+ ns_t_sig = 24, /* Security signature. */
+Index: misc.hh
+===================================================================
+--- misc.hh.orig 2007-10-19 00:30:59.000000000 +0200
++++ misc.hh 2007-10-19 00:47:41.427931184 +0200
+@@ -206,7 +206,7 @@ inline bool dns_isspace(char c)
+ return c==' ' || c=='\t' || c=='\r' || c=='\n';
+ }
+
+-inline const char dns_tolower(char c)
++inline char dns_tolower(char c)
+ {
+ if(c>='A' && c<='Z')
+ c+='a'-'A';
+Index: dnsparser.cc
+===================================================================
+--- dnsparser.cc.orig 2006-11-12 17:56:13.000000000 +0100
++++ dnsparser.cc 2007-10-19 00:51:53.895177932 +0200
+@@ -205,7 +205,7 @@ void MOADNSParser::init(const char *pack
+ struct dnsrecordheader ah;
+ vector<unsigned char> record;
+ validPacket=true;
+- for(n=0;n < d_header.ancount + d_header.nscount + d_header.arcount; ++n) {
++ for(n=0;n < (unsigned)(d_header.ancount + d_header.nscount + d_header.arcount); ++n) {
+ DNSRecord dr;
+
+ if(n < d_header.ancount)
|
[-]
[+]
|
Added |
pdns-recursor-3.1.4_r965.patch
^
|
@@ -0,0 +1,20 @@
+------------------------------------------------------------------------
+r965 | ahu | 2007-03-07 19:12:14 +0100 (Wed, 07 Mar 2007) | 3 lines
+
+work around a g++ quirk (probably, might also be legitimate problem)
+
+
+------------------------------------------------------------------------
+Index: dns.hh
+===================================================================
+--- dns.hh (revision 964)
++++ dns.hh (revision 965)
+@@ -46,7 +46,7 @@
+ class RCode
+ {
+ public:
+- enum { NoError=0, FormErr=1, ServFail=2, NXDomain=3, NotImp=4, Refused=5 };
++ enum rcodes_ { NoError=0, FormErr=1, ServFail=2, NXDomain=3, NotImp=4, Refused=5 };
+ };
+
+ class Opcode
|
|
Added |
pdns-recursor-3.1.4.tar.bz2
^
|
[-]
[+]
|
Added |
pdns-recursor.init
^
|
@@ -0,0 +1,278 @@
+#! /bin/sh
+# Copyright (c) 1995-2004 SUSE Linux AG, Nuernberg, Germany.
+# All rights reserved.
+#
+# Author: Marcus Rueckert
+# Please send feedback to http://bugs.opensuse.org
+#
+# /etc/init.d/pdns-recursor
+# and its symbolic link
+# /(usr/)sbin/rcpdns-rcursor
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# Template system startup script for some example service/daemon PDNS_RECURSOR
+#
+# LSB compatible service control script; see http://www.linuxbase.org/spec/
+#
+# Note: This template uses functions rc_XXX defined in /etc/rc.status on
+# UnitedLinux (UL) based Linux distributions. If you want to base your
+# script on this template and ensure that it works on non UL based LSB
+# compliant Linux distributions, you either have to provide the rc.status
+# functions from UL or change the script to work without them.
+#
+### BEGIN INIT INFO
+# Provides: PDNS_RECURSOR
+# Required-Start: $syslog $remote_fs
+# Should-Start: $time ypbind sendmail
+# Required-Stop: $syslog $remote_fs
+# Should-Stop: $time ypbind sendmail
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: pdns-recursor is a fast dns-cache
+# Description: pdns-recursor is a fast dns-cache
+### END INIT INFO
+#
+# Any extensions to the keywords given above should be preceeded by
+# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB.
+#
+# Notes on Required-Start/Should-Start:
+# * There are two different issues that are solved by Required-Start
+# and Should-Start
+# (a) Hard dependencies: This is used by the runlevel editor to determine
+# which services absolutely need to be started to make the start of
+# this service make sense. Example: nfsserver should have
+# Required-Start: $portmap
+# Also, required services are started before the dependent ones.
+# The runlevel editor will warn about such missing hard dependencies
+# and suggest enabling. During system startup, you may expect an error,
+# if the dependency is not fulfilled.
+# (b) Specifying the init script ordering, not real (hard) dependencies.
+# This is needed by insserv to determine which service should be
+# started first (and at a later stage what services can be started
+# in parallel). The tag Should-Start: is used for this.
+# It tells, that if a service is available, it should be started
+# before. If not, never mind.
+# * When specifying hard dependencies or ordering requirements, you can
+# use names of services (contents of their Provides: section)
+# or pseudo names starting with a $. The following ones are available
+# according to LSB (1.1):
+# $local_fs all local file systems are mounted
+# (most services should need this!)
+# $remote_fs all remote file systems are mounted
+# (note that /usr may be remote, so
+# many services should Require this!)
+# $syslog system logging facility up
+# $network low level networking (eth card, ...)
+# $named hostname resolution available
+# $netdaemons all network daemons are running
+# The $netdaemons pseudo service has been removed in LSB 1.2.
+# For now, we still offer it for backward compatibility.
+# These are new (LSB 1.2):
+# $time the system time has been set correctly
+# $portmap SunRPC portmapping service available
+# UnitedLinux extensions:
+# $ALL indicates that a script should be inserted
+# at the end
+# * The services specified in the stop tags
+# (Required-Stop/Should-Stop)
+# specify which services need to be still running when this service
+# is shut down. Often the entries there are just copies or a subset
+# from the respective start tag.
+# * Should-Start/Stop are now part of LSB as of 2.0,
+# formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop.
+# insserv does support both variants.
+# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time
+# (%fillup_and_insserv macro in %post of many RPMs) to specify whether
+# a startup script should default to be enabled after installation.
+# It's not used by insserv.
+#
+# Note on runlevels:
+# 0 - halt/poweroff 6 - reboot
+# 1 - single user 2 - multiuser without network exported
+# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
+#
+# Note on script names:
+# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
+# A registry has been set up to manage the init script namespace.
+# http://www.lanana.org/
+# Please use the names already registered or register one or use a
+# vendor prefix.
+
+
+# Check for missing binaries (stale symlinks should not happen)
+# Note: Special treatment of stop for LSB conformance
+PDNS_RECURSOR_BIN=/usr/sbin/pdns_recursor
+test -x $PDNS_RECURSOR_BIN || { echo "$PDNS_RECURSOR_BIN not installed";
+ if [ "$1" = "stop" ]; then exit 0;
+ else exit 5; fi; }
+
+# Check for existence of needed config file and read it
+#PDNS_RECURSOR_CONFIG=/etc/sysconfig/pdns
+#test -r $PDNS_RECURSOR_CONFIG || { echo "$PDNS_RECURSOR_CONFIG not existing";
+# if [ "$1" = "stop" ]; then exit 0;
+# else exit 6; fi; }
+
+# Read config
+#. $PDNS_RECURSOR_CONFIG
+
+# Source LSB init functions
+# providing start_daemon, killproc, pidofproc,
+# log_success_msg, log_failure_msg and log_warning_msg.
+# This is currently not used by UnitedLinux based distributions and
+# not needed for init scripts for UnitedLinux only. If it is used,
+# the functions from rc.status should not be sourced or used.
+#. /lib/lsb/init-functions
+
+# Shell functions sourced from /etc/rc.status:
+# rc_check check and set local and overall rc status
+# rc_status check and set local and overall rc status
+# rc_status -v be verbose in local rc status and clear it afterwards
+# rc_status -v -r ditto and clear both the local and overall rc status
+# rc_status -s display "skipped" and exit with status 3
+# rc_status -u display "unused" and exit with status 3
+# rc_failed set local and overall rc status to failed
+# rc_failed <num> set local and overall rc status to <num>
+# rc_reset clear both the local and overall rc status
+# rc_exit exit appropriate to overall rc status
+# rc_active checks whether a service is activated by symlinks
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0 - success
+# 1 - generic or unspecified error
+# 2 - invalid or excess argument(s)
+# 3 - unimplemented feature (e.g. "reload")
+# 4 - user had insufficient privileges
+# 5 - program is not installed
+# 6 - program is not configured
+# 7 - program is not running
+# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
+#
+# Note that starting an already running service, stopping
+# or restarting a not-running service as well as the restart
+# with force-reload (in case signaling is not supported) are
+# considered a success.
+
+case "$1" in
+ start)
+ echo -n "Starting pdns recursor "
+ ## Start daemon with startproc(8). If this fails
+ ## the return value is set appropriately by startproc.
+ /sbin/startproc -q $PDNS_RECURSOR_BIN
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down pdns recursor "
+ ## Stop daemon with killproc(8) and if this fails
+ ## killproc sets the return value according to LSB.
+
+ /sbin/killproc -TERM $PDNS_RECURSOR_BIN
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ try-restart|condrestart)
+ ## Do a restart only if the service was active before.
+ ## Note: try-restart is now part of LSB (as of 1.9).
+ ## RH has a similar command named condrestart.
+ if test "$1" = "condrestart"; then
+ echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+ fi
+ $0 status
|
|
Added |
ready
^
|
[-]
[+]
|
Added |
recursor.conf
^
|
@@ -0,0 +1,115 @@
+## turn on to do AAAA additional processing (slow)
+##
+#aaaa-additional-processing=off
+
+##
+## If set, only allow these comma separated netmasks to recurse
+##
+## By default it only allows queries from
+##
+## 127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12
+##
+#allow-from=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12
+
+##
+## switch to chroot jail
+##
+chroot=/var/lib/pdns
+
+##
+## Timeout in seconds when talking to TCP clients
+##
+#client-tcp-timeout=2
+
+##
+## Operate as a daemon
+##
+#daemon=yes
+
+##
+## Which domains we only accept delegations from
+##
+#delegation-only=
+
+##
+## If set, fork the daemon for possible double performance
+##
+#fork=no
+
+##
+## If set, load root hints from this file
+##
+#hint-file=
+
+##
+## IP addresses to listen on, separated by spaces or commas
+##
+## By default it only listens on 127.0.0.1. If you want to serve
+## for more than one host you should change this.
+##
+#local-address=127.0.0.1
+
+##
+## port to listen on
+##
+#local-port=53
+
+##
+## If we should log rather common errors
+##
+#log-common-errors=yes
+
+##
+## If set, maximum number of entries in the main cache
+##
+#max-cache-entries=0
+
+##
+## Maximum number of simultaneous TCP clients
+##
+#max-tcp-clients=128
+
+##
+## If set, maximum number of TCP sessions per client (IP address)
+##
+#max-tcp-per-client=0
+
+##
+## Source IP address for sending queries
+##
+#query-local-address=0.0.0.0
+
+##
+## Source port address for sending queries, defaults to random
+##
+#query-local-port=12345
+
+##
+## Suppress logging of questions and answers
+##
+#quiet=yes
+
+##
+## If set, change group id to this gid for more security
+##
+setgid=pdns
+
+##
+## If set, change user id to this uid for more security
+##
+setuid=pdns
+
+##
+## If set, only use a single socket for outgoing queries
+##
+#single-socket=off
+
+##
+## If non-zero, assume spoofing after this many near misses
+##
+#spoof-nearmiss-max=20
+
+##
+## if we should output heaps of logging
+##
+#trace=off
|