Commit a4d3698d 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

(cherry picked from commit 5b7883a6)
(cherry picked from commit 9e928d3f)
parent 2079229d
......@@ -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']} AAAA {$laddr6}\"\n";
}
$lladdr6 = find_interface_ipv6_ll($if);
if (is_ipaddrv6($lladdr6)) {
$unbound_entries .= "local-data: \"{$config['system']['hostname']}.{$config['system']['domain']} AAAA {$lladdr6}\"\n";
$unbound_entries .= "local-data: \"{$config['system']['hostname']} AAAA {$lladdr6}\"\n";
if (empty($config['unbound']['noreglladdr6'])) {
$lladdr6 = find_interface_ipv6_ll($if);
if (is_ipaddrv6($lladdr6)) {
$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') {
$pconfig['enable'] = isset($a_unboundcfg['enable']);
$pconfig['dnssec'] = isset($a_unboundcfg['dnssec']);
$pconfig['forwarding'] = isset($a_unboundcfg['forwarding']);
$pconfig['reglladdr6'] = empty($a_unboundcfg['noreglladdr6']);
$pconfig['regdhcp'] = isset($a_unboundcfg['regdhcp']);
$pconfig['regdhcpstatic'] = isset($a_unboundcfg['regdhcpstatic']);
$pconfig['txtsupport'] = isset($a_unboundcfg['txtsupport']);
......@@ -102,6 +103,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$a_unboundcfg['enable'] = !empty($pconfig['enable']);
$a_unboundcfg['dnssec'] = !empty($pconfig['dnssec']);
$a_unboundcfg['forwarding'] = !empty($pconfig['forwarding']);
$a_unboundcfg['noreglladdr6'] = empty($pconfig['reglladdr6']);
$a_unboundcfg['regdhcp'] = !empty($pconfig['regdhcp']);
$a_unboundcfg['regdhcpstatic'] = !empty($pconfig['regdhcpstatic']);
$a_unboundcfg['txtsupport'] = !empty($pconfig['txtsupport']);
......@@ -234,7 +236,7 @@ include_once("head.inc");
</td>
</tr>
<tr>
<td><a id="help_for_regdhcpstatic" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Static DHCP");?></td>
<td><a id="help_for_regdhcpstatic" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?= gettext('DHCP Static Mappings');?></td>
<td>
<input name="regdhcpstatic" type="checkbox" id="regdhcpstatic" value="yes" <?=!empty($pconfig['regdhcpstatic']) ? "checked=\"checked\"" : "";?> />
<strong><?=gettext("Register DHCP static mappings in the DNS Resolver");?></strong>
......@@ -246,6 +248,19 @@ include_once("head.inc");
</div>
</td>
</tr>
<tr>
<td><a id="help_for_reglladdr6" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?= gettext('DHCP IPv6 Link-local') ?></td>
<td>
<input name="reglladdr6" type="checkbox" id="reglladdr6" value="yes" <?= !empty($pconfig['reglladdr6']) ? 'checked="checked"' : '' ?>/>
<strong><?= gettext('Register IPv6 link-local addresses in the DNS Resolver') ?></strong>
<div class="hidden" for="help_for_reglladdr6">
<?= gettext("If this option is unset, 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>
<td><a id="help_for_txtsupport" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("TXT Comment Support");?></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