From 1f8a1167d89d56a2912e94fd3c540d358d44214e Mon Sep 17 00:00:00 2001 From: Warren Baker Date: Mon, 19 Dec 2011 21:57:52 +0200 Subject: Fix check so rogue access-allow doesnt b0rg the config --- config/unbound/unbound.inc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'config/unbound') diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc index 292a2ae6..26109224 100644 --- a/config/unbound/unbound.inc +++ b/config/unbound/unbound.inc @@ -258,7 +258,7 @@ function unbound_get_network_interface_addresses() { $unbound_interfaces[$i]['ipv4']['ipaddr'] = $interfaces[$unboundif]['ipaddr']; $unbound_interfaces[$i]['ipv4']['subnet'] = $interfaces[$unboundif]['subnet']; $unbound_interfaces[$i]['ipv4']['network'] = gen_subnet($unbound_interfaces[$i]['ipv4']['ipaddr'],$unbound_interfaces[$i]['ipv4']['subnet']); - + // Check for CARP addresses and also return those - only IPv4 for now if (isset($config['virtualip'])) { if(is_array($config['virtualip']['vip'])) { @@ -384,9 +384,8 @@ function unbound_acls_config() { } } return $unboundcfg; - } else { + } else return; - } } function unbound_resync_config() { @@ -404,7 +403,7 @@ function unbound_resync_config() { foreach($unboundnetcfg as $netent) { foreach($netent as $entry) { # If virtual interface then skip - if (!$entry['network'] && $entry['subnet']) + if (!$entry['network'] && !$entry['subnet']) continue; $unbound_bind_interfaces .="interface: {$entry['ipaddr']}\n"; if($entry['ipaddr'] != "127.0.0.1" && $entry['ipaddr'] != "::1" ) -- cgit v1.2.3