diff options
author | Chris Buechler <cmb@pfsense.org> | 2014-11-17 22:12:01 -0600 |
---|---|---|
committer | Chris Buechler <cmb@pfsense.org> | 2014-11-17 22:12:01 -0600 |
commit | ebb5ba62f704edaa382ac8a089948c0bce565b44 (patch) | |
tree | f37e97665dc25554183593f4748547eab0ea2d1e /etc/inc/unbound.inc | |
parent | 845fd268c94e3c4de31700ce29963038e28fa017 (diff) | |
download | pfsense-ebb5ba62f704edaa382ac8a089948c0bce565b44.zip pfsense-ebb5ba62f704edaa382ac8a089948c0bce565b44.tar.gz |
check for IPs here also to avoid invalid config entries. change my last fix to v4/v6-specific
Diffstat (limited to 'etc/inc/unbound.inc')
-rw-r--r-- | etc/inc/unbound.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc index 24c30b5..969d686 100644 --- a/etc/inc/unbound.inc +++ b/etc/inc/unbound.inc @@ -130,10 +130,10 @@ EOF; $active_interfaces = explode(",", $config['unbound']['active_interface']); foreach($active_interfaces as $ubif) { $intip = get_interface_ip($ubif); - if (is_ipaddr($intip)) + if (is_ipaddrv4($intip)) $bindints .= "interface: $intip\n"; $intip = get_interface_ipv6($ubif); - if (is_ipaddr($intip)) + if (is_ipaddrv6($intip)) $bindints .= "interface: $intip\n"; } } else { @@ -586,13 +586,13 @@ function unbound_acls_config() { $bindints = ""; foreach($active_interfaces as $ubif => $ifdesc) { $ifip = get_interface_ip($ubif); - if (!is_null($ifip)) { + if (is_ipaddrv4($ifip)) { $subnet_bits = get_interface_subnet($ubif); $subnet_ip = gen_subnet($ifip, $subnet_bits); $aclcfg .= "access-control: {$subnet_ip}/{$subnet_bits} allow\n"; } $ifip = get_interface_ipv6($ubif); - if (!is_null($ifip)) { + if (is_ipaddrv6($ifip)) { $subnet_bits = get_interface_subnetv6($ubif); $subnet_ip = gen_subnetv6($ifip, $subnet_bits); $aclcfg .= "access-control: {$subnet_ip}/{$subnet_bits} allow\n"; |