Commit 5b7883a6 authored by Ian Matyssik's avatar Ian Matyssik Committed by Franco Fichtner

Add option to do not register ipv6 link-local addresses in the DNS Resolver, see #1400

parent 634b4a2f
...@@ -572,10 +572,12 @@ function unbound_add_host_entries() ...@@ -572,10 +572,12 @@ function unbound_add_host_entries()
$unbound_entries .= "local-data: \"{$config['system']['hostname']}.{$config['system']['domain']} AAAA {$laddr6}\"\n"; $unbound_entries .= "local-data: \"{$config['system']['hostname']}.{$config['system']['domain']} AAAA {$laddr6}\"\n";
$unbound_entries .= "local-data: \"{$config['system']['hostname']} AAAA {$laddr6}\"\n"; $unbound_entries .= "local-data: \"{$config['system']['hostname']} AAAA {$laddr6}\"\n";
} }
$lladdr6 = find_interface_ipv6_ll($if); if (!isset($config['unbound']['reglladdr6'])) {
if (is_ipaddrv6($lladdr6)) { $lladdr6 = find_interface_ipv6_ll($if);
$unbound_entries .= "local-data: \"{$config['system']['hostname']}.{$config['system']['domain']} AAAA {$lladdr6}\"\n"; if (is_ipaddrv6($lladdr6)) {
$unbound_entries .= "local-data: \"{$config['system']['hostname']} AAAA {$lladdr6}\"\n"; $unbound_entries .= "local-data: \"{$config['system']['hostname']}.{$config['system']['domain']} AAAA {$lladdr6}\"\n";
$unbound_entries .= "local-data: \"{$config['system']['hostname']} AAAA {$lladdr6}\"\n";
}
} }
} }
} }
......
...@@ -43,6 +43,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -43,6 +43,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['enable'] = isset($a_unboundcfg['enable']); $pconfig['enable'] = isset($a_unboundcfg['enable']);
$pconfig['dnssec'] = isset($a_unboundcfg['dnssec']); $pconfig['dnssec'] = isset($a_unboundcfg['dnssec']);
$pconfig['forwarding'] = isset($a_unboundcfg['forwarding']); $pconfig['forwarding'] = isset($a_unboundcfg['forwarding']);
$pconfig['reglladdr6'] = isset($a_unboundcfg['reglladdr6']);
$pconfig['regdhcp'] = isset($a_unboundcfg['regdhcp']); $pconfig['regdhcp'] = isset($a_unboundcfg['regdhcp']);
$pconfig['regdhcpstatic'] = isset($a_unboundcfg['regdhcpstatic']); $pconfig['regdhcpstatic'] = isset($a_unboundcfg['regdhcpstatic']);
$pconfig['txtsupport'] = isset($a_unboundcfg['txtsupport']); $pconfig['txtsupport'] = isset($a_unboundcfg['txtsupport']);
...@@ -102,6 +103,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') { ...@@ -102,6 +103,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$a_unboundcfg['enable'] = !empty($pconfig['enable']); $a_unboundcfg['enable'] = !empty($pconfig['enable']);
$a_unboundcfg['dnssec'] = !empty($pconfig['dnssec']); $a_unboundcfg['dnssec'] = !empty($pconfig['dnssec']);
$a_unboundcfg['forwarding'] = !empty($pconfig['forwarding']); $a_unboundcfg['forwarding'] = !empty($pconfig['forwarding']);
$a_unboundcfg['reglladdr6'] = !empty($pconfig['reglladdr6']);
$a_unboundcfg['regdhcp'] = !empty($pconfig['regdhcp']); $a_unboundcfg['regdhcp'] = !empty($pconfig['regdhcp']);
$a_unboundcfg['regdhcpstatic'] = !empty($pconfig['regdhcpstatic']); $a_unboundcfg['regdhcpstatic'] = !empty($pconfig['regdhcpstatic']);
$a_unboundcfg['txtsupport'] = !empty($pconfig['txtsupport']); $a_unboundcfg['txtsupport'] = !empty($pconfig['txtsupport']);
...@@ -255,6 +257,19 @@ include_once("head.inc"); ...@@ -255,6 +257,19 @@ include_once("head.inc");
</div> </div>
</td> </td>
</tr> </tr>
<tr>
<td><a id="help_for_reglladdr6" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Disable Link-local Address Registration");?></td>
<td>
<input name="reglladdr6" type="checkbox" id="reglladdr6" value="yes" <?=!empty($pconfig['reglladdr6']) ? "checked=\"checked\"" : "";?> />
<strong><?=gettext("Disable registration of link-local addresses in the DNS Resolver");?></strong>
<div class="hidden" for="help_for_reglladdr6">
<?= gettext("If this option is set, then IPv6 link-local " .
"addresses will not be registered in the DNS Resolver, preventing " .
"return of unreachable address from the DNS resolver when more " .
"than one listen interface is configured."); ?>
</div>
</td>
</tr>
<tr> <tr>
<td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Advanced");?></td> <td><i class="fa fa-info-circle text-muted"></i> <?=gettext("Advanced");?></td>
<td> <td>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment