Revision 4b980701
Added by Renato Botelho about 8 years ago
src/usr/local/www/services_dhcp.php | ||
---|---|---|
412 | 412 |
} |
413 | 413 |
} |
414 | 414 |
|
415 |
/* If enabling DHCP Server, make sure that the DHCP Relay isn't enabled on this interface */ |
|
416 |
if ($_POST['enable'] && isset($config['dhcrelay']['enable']) && (stristr($config['dhcrelay']['interface'], $if) !== false)) { |
|
417 |
$input_errors[] = sprintf(gettext("The DHCP relay on the %s interface must be disabled before enabling the DHCP server."), $iflist[$if]); |
|
418 |
} |
|
419 |
|
|
420 |
/* If disabling DHCP Server, make sure that DHCP registration isn't enabled for DNS forwarder/resolver */ |
|
421 |
if (!$_POST['enable']) { |
|
422 |
if (isset($config['dnsmasq']['enable']) && (isset($config['dnsmasq']['regdhcp']) || isset($config['dnsmasq']['regdhcpstatic']) || isset($config['dnsmasq']['dhcpfirst']))) { |
|
423 |
$input_errors[] = gettext("Disable DHCP Registration features in DNS Forwarder before disabling DHCP Server."); |
|
415 |
if ((!isset($pool) || !is_numeric($pool)) && $act != "newpool") { |
|
416 |
/* If enabling DHCP Server, make sure that the DHCP Relay isn't enabled on this interface */ |
|
417 |
if ($_POST['enable'] && isset($config['dhcrelay']['enable']) && |
|
418 |
(stristr($config['dhcrelay']['interface'], $if) !== false)) { |
|
419 |
$input_errors[] = sprintf(gettext( |
|
420 |
"The DHCP relay on the %s interface must be disabled before enabling the DHCP server."), |
|
421 |
$iflist[$if]); |
|
424 | 422 |
} |
425 |
if (isset($config['unbound']['enable']) && (isset($config['unbound']['regdhcp']) || isset($config['unbound']['regdhcpstatic']))) { |
|
426 |
$input_errors[] = gettext("Disable DHCP Registration features in DNS Resolver before disabling DHCP Server."); |
|
423 |
|
|
424 |
/* If disabling DHCP Server, make sure that DHCP registration isn't enabled for DNS forwarder/resolver */ |
|
425 |
if (!$_POST['enable']) { |
|
426 |
if (isset($config['dnsmasq']['enable']) && |
|
427 |
(isset($config['dnsmasq']['regdhcp']) || |
|
428 |
isset($config['dnsmasq']['regdhcpstatic']) || |
|
429 |
isset($config['dnsmasq']['dhcpfirst']))) { |
|
430 |
$input_errors[] = gettext( |
|
431 |
"Disable DHCP Registration features in DNS Forwarder before disabling DHCP Server."); |
|
432 |
} |
|
433 |
if (isset($config['unbound']['enable']) && |
|
434 |
(isset($config['unbound']['regdhcp']) || |
|
435 |
isset($config['unbound']['regdhcpstatic']))) { |
|
436 |
$input_errors[] = gettext( |
|
437 |
"Disable DHCP Registration features in DNS Resolver before disabling DHCP Server."); |
|
438 |
} |
|
427 | 439 |
} |
428 | 440 |
} |
429 | 441 |
|
Also available in: Unified diff
Checks for DHCP Relay being enabled/disabled should be skipped when editting an additional pool