diff options
-rw-r--r-- | src/usr/local/www/services_dhcp.php | 25 | ||||
-rw-r--r-- | src/usr/local/www/services_dhcpv6.php | 25 |
2 files changed, 50 insertions, 0 deletions
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php index 3e57cea..92a3403 100644 --- a/src/usr/local/www/services_dhcp.php +++ b/src/usr/local/www/services_dhcp.php @@ -640,6 +640,31 @@ if ((isset($_POST['save']) || isset($_POST['apply'])) && (!$input_errors)) { clear_subsystem_dirty('staticmaps'); } } + /* BIND package - Bug #3710 */ + if (!function_exists('is_package_installed')) { + require_once('pkg-utils.inc'); + } + if (is_package_installed('pfSense-pkg-bind') && isset($config['installedpackages']['bind']['config'][0]['enable_bind'])) { + $reloadbind = false; + if (is_array($config['installedpackages']['bindzone'])) { + $bindzone = $config['installedpackages']['bindzone']['config']; + } else { + $bindzone = array(); + } + for ($x = 0; $x < sizeof($bindzone); $x++) { + $zone = $bindzone[$x]; + if ($zone['regdhcpstatic'] == 'on') { + $reloadbind = true; + break; + } + } + if ($reloadbind === true) { + if (file_exists("/usr/local/pkg/bind.inc")) { + require_once("/usr/local/pkg/bind.inc"); + bind_sync(); + } + } + } if ($dhcpd_enable_changed) { $retvalfc |= filter_configure(); } diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php index 3762497..7ea9d69 100644 --- a/src/usr/local/www/services_dhcpv6.php +++ b/src/usr/local/www/services_dhcpv6.php @@ -61,6 +61,31 @@ function dhcpv6_apply_changes($dhcpdv6_enable_changed) { clear_subsystem_dirty('staticmaps'); } } + /* BIND package - Bug #3710 */ + if (!function_exists('is_package_installed')) { + require_once('pkg-utils.inc'); + } + if (is_package_installed('pfSense-pkg-bind') && isset($config['installedpackages']['bind']['config'][0]['enable_bind'])) { + $reloadbind = false; + if (is_array($config['installedpackages']['bindzone'])) { + $bindzone = $config['installedpackages']['bindzone']['config']; + } else { + $bindzone = array(); + } + for ($x = 0; $x < sizeof($bindzone); $x++) { + $zone = $bindzone[$x]; + if ($zone['regdhcpstatic'] == 'on') { + $reloadbind = true; + break; + } + } + if ($reloadbind === true) { + if (file_exists("/usr/local/pkg/bind.inc")) { + require_once("/usr/local/pkg/bind.inc"); + bind_sync(); + } + } + } if ($dhcpdv6_enable_changed) { $retvalfc |= filter_configure(); } |