diff options
author | jim-p <jimp@pfsense.org> | 2015-11-23 16:30:04 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2015-11-23 16:30:04 -0500 |
commit | 98d396835073167efdc6f342e9856d6bb98db08d (patch) | |
tree | 770ae2c61910201e002861a189c4d29085588db5 /src/usr/local | |
parent | 9c96aba446ef00dad8a8283b8219812528713bf1 (diff) | |
download | pfsense-98d396835073167efdc6f342e9856d6bb98db08d.zip pfsense-98d396835073167efdc6f342e9856d6bb98db08d.tar.gz |
Fully separate "Apply" and "Save" actions in the DNS Forwarder. Fixes #5505
Diffstat (limited to 'src/usr/local')
-rw-r--r-- | src/usr/local/www/services_dnsmasq.php | 41 |
1 files changed, 16 insertions, 25 deletions
diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php index 9c11d4a..56c4294 100644 --- a/src/usr/local/www/services_dnsmasq.php +++ b/src/usr/local/www/services_dnsmasq.php @@ -102,16 +102,21 @@ $a_hosts = &$config['dnsmasq']['hosts']; $a_domainOverrides = &$config['dnsmasq']['domainoverrides']; if ($_POST) { - if($_POST['apply']) { - // Reload filter (we might need to sync to CARP hosts) - $retval = filter_configure(); - /* Update resolv.conf in case the interface bindings exclude localhost. */ - system_resolvconf_generate(); - /* Start or restart dhcpleases when it's necessary */ - system_dhcpleases_configure(); - if ($retval == 0) { - clear_subsystem_dirty('hosts'); - } + if ($_POST['apply']) { + $retval = 0; + $retval = services_dnsmasq_configure(); + $savemsg = get_std_save_message($retval); + + // Reload filter (we might need to sync to CARP hosts) + filter_configure(); + /* Update resolv.conf in case the interface bindings exclude localhost. */ + system_resolvconf_generate(); + /* Start or restart dhcpleases when it's necessary */ + system_dhcpleases_configure(); + + if ($retval == 0) { + clear_subsystem_dirty('hosts'); + } } else { $pconfig = $_POST; unset($input_errors); @@ -161,21 +166,7 @@ if ($_POST) { if (!$input_errors) { write_config(); - - $retval = 0; - $retval = services_dnsmasq_configure(); - $savemsg = get_std_save_message($retval); - - // Reload filter (we might need to sync to CARP hosts) - filter_configure(); - /* Update resolv.conf in case the interface bindings exclude localhost. */ - system_resolvconf_generate(); - /* Start or restart dhcpleases when it's necessary */ - system_dhcpleases_configure(); - - if ($retval == 0) { - clear_subsystem_dirty('hosts'); - } + mark_subsystem_dirty('hosts'); } } } |