Commit bc0fe3d4 authored by Franco Fichtner's avatar Franco Fichtner

unbound: real fix for apply glitch

PR: https://forum.opnsense.org/index.php?topic=1490.0
parent 0714fb3b
......@@ -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;
}
}
}
......
<?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++) {
......
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2011 Warren Baker (warren@pfsense.org)
Copyright (C) 2011 Warren Baker <warren@pfsense.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
......@@ -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');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment