unbound: real fix for apply glitch

PR: https://forum.opnsense.org/index.php?topic=1490.0
This commit is contained in:
Franco Fichtner 2015-10-14 18:50:42 +02:00
parent 0714fb3b0d
commit bc0fe3d439
3 changed files with 9 additions and 9 deletions

View File

@ -84,6 +84,7 @@ if ($_POST) {
system_resolvconf_generate();
} else {
$pconfig = $_POST;
if (isset($_POST['enable']) && isset($config['dnsmasq']['enable']))
$input_errors[] = "The system dns-forwarder is still active. Disable it before enabling the DNS Resolver.";
@ -136,8 +137,6 @@ if ($_POST) {
if (!$input_errors) {
write_config("DNS Resolver configured.");
mark_subsystem_dirty('unbound');
header("Location: services_unbound.php");
exit;
}
}
}

View File

@ -1,4 +1,5 @@
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Warren Baker <warren@decoy.co.za>
@ -93,7 +94,6 @@ if ($act == "edit") {
if ($_POST) {
$input_errors = array();
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = services_unbound_configure();
@ -101,6 +101,7 @@ if ($_POST) {
if ($retval == 0)
clear_subsystem_dirty('unbound');
} else {
$pconfig = $_POST;
// input validation - only allow 50 entries in a single ACL
for($x=0; $x<50; $x++) {

View File

@ -1,8 +1,9 @@
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Warren Baker (warren@pfsense.org)
All rights reserved.
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Warren Baker <warren@pfsense.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@ -62,14 +63,14 @@ $pconfig['unwanted_reply_threshold'] = $config['unbound']['unwanted_reply_thresh
$pconfig['log_verbosity'] = isset($config['unbound']['log_verbosity']) ? $config['unbound']['log_verbosity'] : "1";
if ($_POST) {
$pconfig = $_POST;
if ($_POST['apply']) {
$retval = services_unbound_configure();
$savemsg = get_std_save_message();
if ($retval == 0)
clear_subsystem_dirty('unbound');
} else {
$pconfig = $_POST;
if (isset($_POST['hideidentity']))
$config['unbound']['hideidentity'] = true;
else
@ -108,7 +109,6 @@ if ($_POST) {
$config['unbound']['unwanted_reply_threshold'] = $_POST['unwanted_reply_threshold'];
$config['unbound']['log_verbosity'] = $_POST['log_verbosity'];
write_config("DNS Resolver configured.");
mark_subsystem_dirty('unbound');
}
}