mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 01:24:38 +00:00
dhcp: support VIPs in auto-radvd case
This commit is contained in:
parent
20efa4f46c
commit
8801097cbc
@ -483,15 +483,29 @@ function dhcpd_radvd_configure($verbose = false, $blacklist = array())
|
||||
$radvdconf .= sprintf("\tAdvLinkMTU %s;\n", !empty($mtu) ? $mtu : 1280);
|
||||
$radvdconf .= "\tAdvManagedFlag on;\n";
|
||||
$radvdconf .= "\tAdvOtherConfigFlag on;\n";
|
||||
$radvdconf .= "\tprefix {$networkv6} {\n";
|
||||
if ($autotype == 'slaac') {
|
||||
/* XXX also of interest in the future, see hardcoded prefix above */
|
||||
$radvdconf .= "\t\tBase6Interface $realtrackif;\n";
|
||||
|
||||
if (!empty($networkv6)) {
|
||||
$radvdconf .= "\tprefix {$networkv6} {\n";
|
||||
if ($autotype == 'slaac') {
|
||||
/* XXX also of interest in the future, see hardcoded prefix above */
|
||||
$radvdconf .= "\t\tBase6Interface $realtrackif;\n";
|
||||
}
|
||||
$radvdconf .= "\t\tDeprecatePrefix on;\n";
|
||||
$radvdconf .= "\t\tAdvOnLink on;\n";
|
||||
$radvdconf .= "\t\tAdvAutonomous on;\n";
|
||||
$radvdconf .= "\t};\n";
|
||||
}
|
||||
|
||||
foreach (config_read_array('virtualip', 'vip') as $vip) {
|
||||
if ($vip['interface'] == $if && is_ipaddrv6($vip['subnet'])) {
|
||||
$subnetv6 = gen_subnetv6($vip['subnet'], $vip['subnet_bits']);
|
||||
$radvdconf .= "\tprefix $subnetv6}/{$vip['subnet_bits']} {\n";
|
||||
$radvdconf .= "\t\tDeprecatePrefix on;\n";
|
||||
$radvdconf .= "\t\tAdvOnLink on;\n";
|
||||
$radvdconf .= "\t\tAdvAutonomous on;\n";
|
||||
$radvdconf .= "\t};\n";
|
||||
}
|
||||
}
|
||||
$radvdconf .= "\t\tDeprecatePrefix on;\n";
|
||||
$radvdconf .= "\t\tAdvOnLink on;\n";
|
||||
$radvdconf .= "\t\tAdvAutonomous on;\n";
|
||||
$radvdconf .= "\t};\n";
|
||||
|
||||
if (count($dnslist) > 0) {
|
||||
$radvdconf .= "\tRDNSS " . implode(" ", $dnslist) . " { };\n";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user