Project

General

Profile

« Previous | Next » 

Revision c3fb0119

Added by Doktor Notor over 8 years ago

Update BIND zones when adding static DHCP leases if needed (Bug #3710)

View differences:

src/usr/local/www/services_dhcpv6.php
61 61
			clear_subsystem_dirty('staticmaps');
62 62
		}
63 63
	}
64
	/* BIND package - Bug #3710 */
65
	if (!function_exists('is_package_installed')) {
66
		require_once('pkg-utils.inc');
67
	}
68
	if (is_package_installed('pfSense-pkg-bind') && isset($config['installedpackages']['bind']['config'][0]['enable_bind'])) {
69
		$reloadbind = false;
70
		if (is_array($config['installedpackages']['bindzone'])) {
71
			$bindzone = $config['installedpackages']['bindzone']['config'];
72
		} else {
73
			$bindzone = array();
74
		}
75
		for ($x = 0; $x < sizeof($bindzone); $x++) {
76
			if ($zone['regdhcpstatic'] == 'on') {
77
				$reloadbind = true;
78
				break;
79
			}
80
		}
81
		if ($reloadbind === true) {
82
			if (file_exists("/usr/local/pkg/bind.inc")) {
83
				require_once("/usr/local/pkg/bind.inc");
84
				bind_sync();
85
			}
86
		}
87
	}
64 88
	if ($dhcpdv6_enable_changed) {
65 89
		$retvalfc |= filter_configure();
66 90
	}

Also available in: Unified diff