diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index c023b2819..4007188fe 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -412,7 +412,7 @@ function services_dhcpd_configure($family = 'all', $blacklist = array())
}
}
-function is_dhcp_server_enabled()
+function is_dhcpv4_server_enabled()
{
global $config;
@@ -440,7 +440,7 @@ function services_dhcpdv4_configure()
killbypid("{$g['dhcpd_chroot_path']}/var/run/dhcpd.pid");
/* DHCP enabled on any interfaces? */
- if (!is_dhcp_server_enabled()) {
+ if (!is_dhcpv4_server_enabled()) {
return 0;
}
@@ -2542,16 +2542,26 @@ function services_get()
$services[] = $pconfig;
}
- if (is_dhcp_server_enabled()) {
+ if (is_dhcpv4_server_enabled()) {
$pconfig = array();
- $pconfig['name'] = "dhcpd";
- $pconfig['description'] = gettext("DHCP Service");
- $pconfig['php']['restart'] = array('services_dhcpd_configure');
- $pconfig['php']['start'] = array('services_dhcpd_configure');
+ $pconfig['name'] = 'dhcpd';
+ $pconfig['description'] = gettext("DHCP Server");
+ $pconfig['php']['restart'] = array('services_dhcpdv4_configure');
+ $pconfig['php']['start'] = array('services_dhcpdv4_configure');
$pconfig['pidfile'] = "{$g['dhcpd_chroot_path']}/var/run/dhcpd.pid";
$services[] = $pconfig;
}
+ if (is_dhcpv6_server_enabled()) {
+ $pconfig = array();
+ $pconfig['name'] = 'dhcpd6';
+ $pconfig['description'] = gettext("DHCPv6 Server");
+ $pconfig['php']['restart'] = array('services_dhcpdv6_configure');
+ $pconfig['php']['start'] = array('services_dhcpdv6_configure');
+ $pconfig['pidfile'] = "{$g['dhcpd_chroot_path']}/var/run/dhcpdv6.pid";
+ $services[] = $pconfig;
+ }
+
if (is_apinger_enabled()) {
$pconfig = array();
$pconfig['name'] = "apinger";
diff --git a/src/www/services_dhcpv6.php b/src/www/services_dhcpv6.php
index d78b15344..cc7725fe8 100644
--- a/src/www/services_dhcpv6.php
+++ b/src/www/services_dhcpv6.php
@@ -345,8 +345,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
-$service_hook = 'dhcpd';
+$service_hook = 'dhcpd6';
+
legacy_html_escape_form_data($pconfig);
+
include("head.inc");
?>
diff --git a/src/www/services_dhcpv6_relay.php b/src/www/services_dhcpv6_relay.php
index 5fb933ca9..9bce2cbf4 100644
--- a/src/www/services_dhcpv6_relay.php
+++ b/src/www/services_dhcpv6_relay.php
@@ -108,11 +108,11 @@ include("head.inc");
0) print_input_errors($input_errors); ?>