diff options
author | jim-p <jimp@pfsense.org> | 2017-04-03 15:46:13 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-04-03 15:46:13 -0400 |
commit | 7d039bc6138910a90da3c070d21cf93c7c4fbace (patch) | |
tree | 942e2317dc9853ccf1802b1721d376ffc312dc06 /src/usr/local/www | |
parent | 4572c625a577c5a5ef7aa3cf3c4846a9e064e55f (diff) | |
parent | 6cc58ae8d8cf69a22e2b155aa670c95a46593a25 (diff) | |
download | pfsense-7d039bc6138910a90da3c070d21cf93c7c4fbace.zip pfsense-7d039bc6138910a90da3c070d21cf93c7c4fbace.tar.gz |
Merge pull request #3584 from doktornotor/patch-11
Diffstat (limited to 'src/usr/local/www')
-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(); } |