mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
dhcpv6 static leases with tracked interface: apply prefix to fixed IPv6 address
PR: https://github.com/opnsense/core/pull/2859
This commit is contained in:
parent
7f267551bb
commit
26705ee022
@ -1385,6 +1385,14 @@ host s_{$dhcpv6if}_{$i} {
|
||||
host-identifier option dhcp6.client-id {$sm['duid']};
|
||||
|
||||
EOD;
|
||||
if (!empty($sm['ipaddrv6'])) {
|
||||
if (isset($config['interfaces'][$dhcpv6if]['dhcpd6track6allowoverride']) && is_ipaddrv6($ifcfgipv6)) {
|
||||
$sm['ipaddrv6'] = make_ipv6_64_address($ifcfgipv6, $sm['ipaddrv6']);
|
||||
} else {
|
||||
unset($sm['ipaddrv6']);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($sm['ipaddrv6'])) {
|
||||
$dhcpdv6conf .= " fixed-address6 {$sm['ipaddrv6']};\n";
|
||||
}
|
||||
|
||||
@ -180,6 +180,9 @@ include("head.inc");
|
||||
<?=gettext("If an IPv6 address is entered, the address must be outside of the pool.");?>
|
||||
<br />
|
||||
<?=gettext("If no IPv6 address is given, one will be dynamically allocated from the pool.");?>
|
||||
<br />
|
||||
<?= gettext("When using a static WAN address, this should be entered using the full IPv6 address. " .
|
||||
"When using a dynamic WAN address, only enter the suffix part (i.e. ::1:2:3:4)."); ?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user