From: Chris Hofstaedtler Date: Tue, 20 Feb 2018 09:48:41 +0000 (+0100) Subject: debian: drop allow-recursion handling X-Git-Tag: dnsdist-1.3.0~89^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9896846b96c32924ecf07d9f165c8da7310627af;p=pdns debian: drop allow-recursion handling --- diff --git a/build-scripts/debian-authoritative/pdns-server.config b/build-scripts/debian-authoritative/pdns-server.config index 08f55575b..f2a181bae 100644 --- a/build-scripts/debian-authoritative/pdns-server.config +++ b/build-scripts/debian-authoritative/pdns-server.config @@ -11,34 +11,17 @@ PDNSCONF=/etc/powerdns/pdns.conf db_version 2.0 if [ ! -f $PDNSCONF ]; then db_input medium pdns-server/localaddress || true - db_input medium pdns-server/allowrecursion || true db_go || true else LOCAL=`(cat $PDNSCONF | grep "^local-address=" | awk -F '=' '{print $2}') || true` - RECURSION=`(cat $PDNSCONF | grep "^allow-recursion=" | awk -F '=' '{print $2}') || true` - # Put multiple lines on one line and separate them by a comma - REC="" - for i in $RECURSION; do - REC="$i,$REC" - done - - # Remove , on the end of the line - RECURSION=`echo $REC | sed -e 's/,$//'` - - if [ ! -z "$RECURSION" ]; then - db_set pdns-server/allowrecursion "$RECURSION" - else - db_set pdns-server/allowrecursion "127.0.0.1" - fi if [ ! -z "$LOCAL" ]; then db_set pdns-server/localaddress $LOCAL else db_set pdns-server/localaddress "0.0.0.0" fi - db_fset pdns-server/allowrecursion seen true db_fset pdns-server/localaddress seen true fi diff --git a/build-scripts/debian-authoritative/pdns-server.postinst b/build-scripts/debian-authoritative/pdns-server.postinst index e83ea4d1a..af42f6849 100644 --- a/build-scripts/debian-authoritative/pdns-server.postinst +++ b/build-scripts/debian-authoritative/pdns-server.postinst @@ -76,12 +76,6 @@ case "$1" in sed -i -e "s|^\(#\)\?\(# \)\?local-address=.*$|local-address=$RET|" $PDNSCONFTEMP fi - # Allow recursion subnets ? - db_get pdns-server/allowrecursion || true - if [ ! -z "$RET" ]; then - sed -i -e "s|^\(#\)\?\(# \)\?allow-recursion=.*$|allow-recursion=$RET|" $PDNSCONFTEMP - fi - # this can be removed once we do not have to update from # wheezy (pdns 3.1) any more. Note: there was never pdns 3.2 in Debian if [ -n "$2" ] && dpkg --compare-versions "$2" lt 3.3; then diff --git a/build-scripts/debian-authoritative/pdns-server.templates b/build-scripts/debian-authoritative/pdns-server.templates index 737b5e4ae..dec625632 100644 --- a/build-scripts/debian-authoritative/pdns-server.templates +++ b/build-scripts/debian-authoritative/pdns-server.templates @@ -4,12 +4,3 @@ _Description: IP address where PowerDNS should listen on: If you have multiple IPs, the default behaviour of binding to all addresses can cause the OS to select the wrong IP for outgoing packets, so it is recommended to bind PowerDNS to a specific IP here. - -Template: pdns-server/allowrecursion -Type: string -Default: 127.0.0.1 -_Description: List of subnets that are allowed to recurse: - Enter here, comma separated, the subnets that are allowed to recurse. - Allowed values are 127.0.0.1 for an ip address and 192.168.0.0/24 for a - subnet. -