Commit 3336c43d authored by Franco Fichtner's avatar Franco Fichtner

services: dhcpd6 only run when prefix delegation is needed

parent 5076ad19
......@@ -1054,9 +1054,10 @@ function is_dhcpv6_server_enabled()
{
global $config;
if (is_array($config['interfaces'])) {
foreach (legacy_config_get_interfaces(array("virtual" => false)) as $ifcfg) {
if (isset($ifcfg['enable']) && !empty($ifcfg['track6-interface'])) {
foreach (legacy_config_get_interfaces(array('virtual' => false)) as $ifcfg) {
if (isset($ifcfg['enable']) && !empty($ifcfg['track6-interface'])) {
$pdlen = calculate_ipv6_delegation_length($ifcfg['track6-interface']);
if ($pdlen > 2) {
return true;
}
}
......
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