From fe0163a939023f87b259f3475a89ee632824a973 Mon Sep 17 00:00:00 2001 From: Stuart Wyatt Date: Thu, 9 Apr 2015 09:50:08 -0700 Subject: BIND - add support for named command line options -4 and -6 -4 and -6 restrict the resolver to use the IPv4 and IPv6 transports respectively. The option is needed for the cases such as when you have IPv6 enabled on the LAN, but the WAN does not support IPv6. Add a list of choices with IPv4+IPv6 (default), IPv4 (only) and IPv6 (only) If IPv4 is selected, -4 will be added to the command line If IPv6 is selected, -6 will be added to the command line --- config/bind/bind.inc | 13 ++++++++----- config/bind/bind.xml | 12 ++++++++++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/config/bind/bind.inc b/config/bind/bind.inc index 747fdc27..ba8c5dfe 100644 --- a/config/bind/bind.inc +++ b/config/bind/bind.inc @@ -799,12 +799,15 @@ function bind_print_javascript_type_zone2() function bind_write_rcfile() { + global $config; + $bind = $config['installedpackages']['bind']['config'][0]; + $ip_version = ($bind['bind_ip_version'] ? $bind['bind_ip_version'] : ""); $rc = array(); $BIND_LOCALBASE = "/usr/local"; $rc['file'] = 'named.sh'; $rc['start'] = <</dev/null sleep 3 - {$BIND_LOCALBASE}/sbin/named -c /etc/namedb/named.conf -u bind -t /cf/named/ + {$BIND_LOCALBASE}/sbin/named {$ip_version} -c /etc/namedb/named.conf -u bind -t /cf/named/ fi EOD; conf_mount_rw(); diff --git a/config/bind/bind.xml b/config/bind/bind.xml index 3b5d9ad2..c24bf351 100644 --- a/config/bind/bind.xml +++ b/config/bind/bind.xml @@ -142,6 +142,18 @@ checkbox + + IP Version + bind_ip_version + + This controls which transports are used when resolving queries.]]> + select + + + + + + Listen on listenon -- cgit v1.2.3