mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 09:04:39 +00:00
inc: fix call to undefined function is_dhcpv6_server_enabled()
While there, move the IPv4 sibling and add a require for the remaining outside caller.
This commit is contained in:
parent
5b7df97407
commit
b0704185bf
@ -500,43 +500,6 @@ function reload_ttys()
|
||||
exec('/bin/kill -HUP 1');
|
||||
}
|
||||
|
||||
/* DHCP enabled on any interfaces? */
|
||||
function is_dhcp_server_enabled() {
|
||||
global $config;
|
||||
|
||||
if (!is_array($config['dhcpd']))
|
||||
return false;
|
||||
|
||||
foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) {
|
||||
if (isset($dhcpifconf['enable']) && !empty($config['interfaces'][$dhcpif]))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* DHCP enabled on any interfaces? */
|
||||
function is_dhcpv6_server_enabled() {
|
||||
global $config;
|
||||
|
||||
if (is_array($config['interfaces'])) {
|
||||
foreach ($config['interfaces'] as $ifcfg) {
|
||||
if (isset($ifcfg['enable']) && !empty($ifcfg['track6-interface']))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($config['dhcpdv6']) || !is_array($config['dhcpdv6']))
|
||||
return false;
|
||||
|
||||
foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) {
|
||||
if (isset($dhcpv6ifconf['enable']) && !empty($config['interfaces'][$dhcpv6if]))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/* radvd enabled on any interfaces? */
|
||||
function is_radvd_enabled() {
|
||||
global $config;
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
require_once("globals.inc");
|
||||
require_once("captiveportal.inc");
|
||||
require_once("openvpn.inc");
|
||||
require_once("services.inc");
|
||||
require_once("ipsec.inc");
|
||||
require_once("vpn.inc");
|
||||
require_once("vslb.inc");
|
||||
|
||||
@ -364,6 +364,23 @@ function services_dhcpd_configure($family = "all", $blacklist = array())
|
||||
}
|
||||
}
|
||||
|
||||
function is_dhcp_server_enabled()
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (!is_array($config['dhcpd'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) {
|
||||
if (isset($dhcpifconf['enable']) && !empty($config['interfaces'][$dhcpif])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function services_dhcpdv4_configure()
|
||||
{
|
||||
global $config, $g;
|
||||
@ -977,6 +994,31 @@ function dhcpdzones($ddns_zones, $dhcpifconf)
|
||||
return $dhcpdconf;
|
||||
}
|
||||
|
||||
function is_dhcpv6_server_enabled()
|
||||
{
|
||||
global $config;
|
||||
|
||||
if (is_array($config['interfaces'])) {
|
||||
foreach ($config['interfaces'] as $ifcfg) {
|
||||
if (isset($ifcfg['enable']) && !empty($ifcfg['track6-interface'])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($config['dhcpdv6']) || !is_array($config['dhcpdv6'])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) {
|
||||
if (isset($dhcpv6ifconf['enable']) && !empty($config['interfaces'][$dhcpv6if])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function services_dhcpdv6_configure($blacklist = array())
|
||||
{
|
||||
global $config, $g;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user