aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2010-11-18 22:43:08 +0200
committerWarren Baker <warren@decoy.co.za>2010-11-18 22:43:08 +0200
commitdf332357f43ba0e624539748d22a8bf1b60dac20 (patch)
treed87df73b29fe06862be89b1748a69dd337f0710f
parent6a5886839e5ad9c0aa0697d44553336ba32b804e (diff)
downloadpfsense-packages-df332357f43ba0e624539748d22a8bf1b60dac20.tar.gz
pfsense-packages-df332357f43ba0e624539748d22a8bf1b60dac20.tar.bz2
pfsense-packages-df332357f43ba0e624539748d22a8bf1b60dac20.zip
Listen on CARP VIPs that are associated to the interfaces that have been selected.
-rw-r--r--config/unbound/unbound.inc23
-rwxr-xr-xpkg_config.8.xml2
-rwxr-xr-xpkg_config.8.xml.amd642
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>