aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2011-01-11 14:41:18 +0200
committerWarren Baker <warren@decoy.co.za>2011-01-11 14:41:18 +0200
commit20f3822c87e64505d9e78ccdc5e0a97bbee4de99 (patch)
treec514c649e5d879f137f60ea1c9c5b22404471e71 /config
parent467cf2d4bd614b46e0b4d152f8750903ba1e98e5 (diff)
downloadpfsense-packages-20f3822c87e64505d9e78ccdc5e0a97bbee4de99.tar.gz
pfsense-packages-20f3822c87e64505d9e78ccdc5e0a97bbee4de99.tar.bz2
pfsense-packages-20f3822c87e64505d9e78ccdc5e0a97bbee4de99.zip
Ensure number is not a negative.
Diffstat (limited to 'config')
-rw-r--r--config/unbound/unbound.inc16
1 files changed, 13 insertions, 3 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index 6d178e83..cb35c81a 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -454,7 +454,12 @@ function unbound_optimization() {
foreach ($config['sysctl']['item'] as $tunable) {
if ($tunable['tunable'] == 'kern.ipc.maxsockbuf') {
$so = floor(($tunable['value']/1024/1024)-1);
- $optimization['so_rcvbuf'] = "so-rcvbuf: {$so}m";
+ // Check to ensure that the number is not a negative
+ if ($so > 0)
+ $optimization['so_rcvbuf'] = "so-rcvbuf: {$so}m";
+ else
+ unset($optimization['so_rcvbuf']);
+
}
}
// Safety check in case kern.ipc.maxsockbuf is deleted.
@@ -490,11 +495,16 @@ function fetch_root_hints() {
}
}
-function unbound_validate($post) {
+function unbound_validate($post, $acl=false) {
global $config, $input_errors;
- if($_POST['unbound_status'] == "on" && isset($config['dnsmasq']['enable']))
+ if($post['unbound_status'] == "on" && isset($config['dnsmasq']['enable']))
$input_errors[] = "The system dns-forwarder is still active. Disable it before enabling the Unbound service.";
+
+ if($acl) {
+ if(isset($post['row']['acl_network']))
+ print_r($post); exit;
+ }
}