mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
router advertisements: fix dhcp6 start on 'unamaged'
We set the mode for radvd config, not for preventing users to configure a DHCP6 while in unmanaged mode. PR: https://github.com/opnsense/core/issues/1258
This commit is contained in:
parent
5376520776
commit
97c4edf4d2
@ -165,6 +165,8 @@ function services_radvd_configure($blacklist = array())
|
||||
$radvdconf .= "\tAdvManagedFlag on;\n";
|
||||
$radvdconf .= "\tAdvOtherConfigFlag on;\n";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
$radvdconf .= "\tprefix {$subnetv6}/{$ifcfgsnv6} {\n";
|
||||
$radvdconf .= "\t\tDeprecatePrefix ". (!empty($dhcpv6ifconf['rainterface']) ? "off" : "on").";\n";
|
||||
@ -185,6 +187,8 @@ function services_radvd_configure($blacklist = array())
|
||||
$radvdconf .= "\t\tAdvAutonomous on;\n";
|
||||
$radvdconf .= "\t\tAdvRouterAddr on;\n";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
$radvdconf .= "\t};\n";
|
||||
|
||||
@ -1267,21 +1271,19 @@ EOD;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($config['dhcpdv6'][$dhcpv6if]['ramode']) && $config['dhcpdv6'][$dhcpv6if]['ramode'] <> "unmanaged") {
|
||||
if (preg_match("/poes/si", $dhcpv6if)) {
|
||||
/* magic here */
|
||||
$dhcpdv6ifs = array_merge($dhcpdv6ifs, get_pppoes_child_interfaces($dhcpv6if));
|
||||
} else {
|
||||
$realif = get_real_interface($dhcpv6if, "inet6");
|
||||
if (stristr("$realif", "bridge")) {
|
||||
$mac = get_interface_mac($realif);
|
||||
$v6address = generate_ipv6_from_mac($mac);
|
||||
/* Create link local address for bridges */
|
||||
mwexec("/sbin/ifconfig {$realif} inet6 {$v6address}");
|
||||
}
|
||||
$realif = escapeshellcmd($realif);
|
||||
$dhcpdv6ifs[] = $realif;
|
||||
if (preg_match("/poes/si", $dhcpv6if)) {
|
||||
/* magic here */
|
||||
$dhcpdv6ifs = array_merge($dhcpdv6ifs, get_pppoes_child_interfaces($dhcpv6if));
|
||||
} else {
|
||||
$realif = get_real_interface($dhcpv6if, "inet6");
|
||||
if (stristr("$realif", "bridge")) {
|
||||
$mac = get_interface_mac($realif);
|
||||
$v6address = generate_ipv6_from_mac($mac);
|
||||
/* create link local address for bridges */
|
||||
mwexec("/sbin/ifconfig {$realif} inet6 {$v6address}");
|
||||
}
|
||||
$realif = escapeshellcmd($realif);
|
||||
$dhcpdv6ifs[] = $realif;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user