Skip v6 WANs in Unbound access-control. Ticket #4023

This commit is contained in:
Chris Buechler 2014-11-28 17:30:16 -06:00
parent 80075b9e87
commit 5a663a5d56

View File

@ -619,7 +619,9 @@ function unbound_acls_config() {
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";
// only add LAN-type interfaces
if (!interface_has_gateway($ubif))
$aclcfg .= "access-control: {$subnet_ip}/{$subnet_bits} allow\n";
// add for IPv6 static routes to local networks
// for safety, we include only routes reachable on an interface with no
// gateway specified - read: not an Internet connection.