summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-12-15 17:16:48 -0200
committerRenato Botelho <garga@FreeBSD.org>2014-12-15 17:18:59 -0200
commit73041230a79f7b0f2cbae60cf51596a1232d5029 (patch)
treed625009d4438ed1aed030299f3ae43428c92b487
parentd691465c720a0a378fe091b22c929ca38a2d0b4d (diff)
downloadpfsense-73041230a79f7b0f2cbae60cf51596a1232d5029.zip
pfsense-73041230a79f7b0f2cbae60cf51596a1232d5029.tar.gz
Add DNS Resolver to the list of services to be sync'd on HA, make sure it and DNS Forwarder are not enabled simultaneously. It fixes #4067
-rwxr-xr-xetc/rc.filter_synchronize8
-rwxr-xr-xusr/local/www/system_hasync.php4
-rwxr-xr-xusr/local/www/xmlrpc.php12
3 files changed, 20 insertions, 4 deletions
diff --git a/etc/rc.filter_synchronize b/etc/rc.filter_synchronize
index b3d8755..22c7e12 100755
--- a/etc/rc.filter_synchronize
+++ b/etc/rc.filter_synchronize
@@ -384,8 +384,12 @@ if (is_array($config['hasync'])) {
if ($hasync['synchronizeauthservers'] != "") {
$sections[] = 'authserver';
}
- if ($hasync['synchronizednsforwarder'] != "" and is_array($config['dnsmasq']))
- $sections[] = 'dnsmasq';
+ if ($hasync['synchronizednsforwarder'] != "") {
+ if (is_array($config['dnsmasq']))
+ $sections[] = 'dnsmasq';
+ if (is_array($config['unbound']))
+ $sections[] = 'unbound';
+ }
if ($hasync['synchronizeschedules'] != "" || $hasync['synchronizerules'] != "") {
if (!is_array($config['schedules']))
$config['schedules'] = array();
diff --git a/usr/local/www/system_hasync.php b/usr/local/www/system_hasync.php
index caeb79d..f77f666 100755
--- a/usr/local/www/system_hasync.php
+++ b/usr/local/www/system_hasync.php
@@ -322,11 +322,11 @@ include("head.inc");
</td>
</tr>
<tr valign="top">
- <td width="22%" class="vncell">Synchronize DNS Forwarder</td>
+ <td width="22%" class="vncell">Synchronize DNS Forwarder / Resolver</td>
<td class="vtable">
<input id='synchronizednsforwarder' type='checkbox' name='synchronizednsforwarder' value='on' <?php if ($pconfig['synchronizednsforwarder'] === "on") echo "checked='checked'"; ?> />
<br />
- When this option is enabled, this system will automatically sync the DNS Forwarder configuration to the other HA host when changes are made.
+ When this option is enabled, this system will automatically sync the DNS Forwarder and DNS Resolver configuration to the other HA host when changes are made.
</td>
</tr>
<tr valign="top">
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index a44789d..88dc537 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -211,6 +211,18 @@ function restore_config_section_xmlrpc($raw_params) {
}
}
+ /*
+ * Make sure it doesn't end up with both dnsmasq and unbound enabled
+ * simultaneously in secondary
+ * */
+ if (isset($params[0]['unbound']['enable']) && isset($config['dnsmasq']['enable'])) {
+ unset($config['dnsmasq']['enable']);
+ services_dnsmasq_configure();
+ } else if (isset($params[0]['dnsmasq']['enable']) && isset($config['unbound']['enable'])) {
+ unset($config['unbound']['enable']);
+ services_unbound_configure();
+ }
+
// For vip section, first keep items sent from the master
$config = array_merge_recursive_unique($config, $params[0]);
OpenPOWER on IntegriCloud