summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2017-02-25 15:43:41 +0100
committerGitHub <noreply@github.com>2017-02-25 15:43:41 +0100
commita207d2c951261d2d54de30b1ae3b3eada0898aa5 (patch)
tree1d93f072f768b57eefd2e019c2835d5f1765026b /src/usr/local/www/services_dhcp.php
parent69860ee4f5ff9f1e5b87bc6fdcb6dfea66062726 (diff)
downloadpfsense-a207d2c951261d2d54de30b1ae3b3eada0898aa5.zip
pfsense-a207d2c951261d2d54de30b1ae3b3eada0898aa5.tar.gz
Update BIND zones when adding static DHCP leases if needed (Bug #3710)
Diffstat (limited to 'src/usr/local/www/services_dhcp.php')
-rw-r--r--src/usr/local/www/services_dhcp.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index 3e57cea..cf22d73 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -640,6 +640,30 @@ 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++) {
+ 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();
}
OpenPOWER on IntegriCloud