Commit 21f651c6 authored by Franco Fichtner's avatar Franco Fichtner

services: dhcpd6 only run when prefix delegation is needed

(cherry picked from commit 3336c43d)
parent 0b0e64e1
......@@ -1057,10 +1057,13 @@ function is_dhcpv6_server_enabled()
if (is_array($config['interfaces'])) {
foreach ($config['interfaces'] as $ifcfg) {
if (isset($ifcfg['enable']) && !empty($ifcfg['track6-interface'])) {
$pdlen = calculate_ipv6_delegation_length($ifcfg['track6-interface']);
if ($pdlen > 2) {
return true;
}
}
}
}
if (!isset($config['dhcpdv6']) || !is_array($config['dhcpdv6'])) {
return false;
......
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