diff options
-rw-r--r-- | config/unbound/unbound.inc | 23 | ||||
-rwxr-xr-x | pkg_config.8.xml | 2 | ||||
-rwxr-xr-x | pkg_config.8.xml.amd64 | 2 |
3 files changed, 21 insertions, 6 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc index 3d4bc529..2b3b30b0 100644 --- a/config/unbound/unbound.inc +++ b/config/unbound/unbound.inc @@ -28,6 +28,7 @@ if(!function_exists("get_dns_servers")) if(!function_exists("get_nameservers")) require_once("system.inc"); + function unbound_initial_setup() { global $config; @@ -204,17 +205,31 @@ function unbound_get_network_interface_addresses($subnet=false, $mask=false) { $unboundrealif = convert_friendly_interface_to_real_interface_name($unboundif); $unboundip = find_interface_ip($unboundrealif); $ipmask = find_interface_subnet($unboundrealif); + // If $subnet is passed then calculate the beginning of the network range for the IP address if ($subnet) $network = gen_subnet($unboundip, $ipmask); else $network = $unboundip; - if ($mask) + + if ($mask) $unbound_interfaces[] = "$network/$ipmask"; - else - $unbound_interfaces[] = "$network"; - } + else { + $unbound_interfaces[] = $network; + // Check for CARP addresses and also return those + if (isset($config['virtualip'])) { + foreach($config['virtualip']['vip'] as $vip) { + if (($vip['interface'] == $unboundif) && ($vip['mode'] == "carp")) { + $virtual_ip = find_interface_ip(link_ip_to_carp_interface($vip['subnet'])); + $unbound_interfaces[] = $virtual_ip; + } + } + } + } + } + return $unbound_interfaces; + } function unbound_resync_config() { diff --git a/pkg_config.8.xml b/pkg_config.8.xml index 273c57f7..ad88b884 100755 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -945,7 +945,7 @@ <descr>Unbound is a validating, recursive, and caching DNS resolver.</descr> <website>http://www.unbound.net/</website> <category>Services</category> - <version>1.1</version> + <version>1.2</version> <status>Alpha</status> <required_version>2.0</required_version> <pkginfolink>http://doc.pfsense.org/index.php/Unbound_package</pkginfolink> diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index deab6180..7d6dd3a4 100755 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -961,7 +961,7 @@ <descr>Unbound is a validating, recursive, and caching DNS resolver.</descr> <website>http://www.unbound.net/</website> <category>Services</category> - <version>1.1</version> + <version>1.2</version> <status>Alpha</status> <required_version>2.0</required_version> <pkginfolink>http://doc.pfsense.org/index.php/Unbound_package</pkginfolink> |