summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2015-01-09 10:23:54 +0200
committerChris Buechler <cmb@pfsense.org>2015-01-12 16:32:07 -0600
commitad9148aefaa71bfda268780845b6d75d6f7d8d23 (patch)
tree8a314ccd079fa4f62e700f9265864b42927f479d /etc/inc
parentbdb8fbffb0ce409b428c4bb6fd38987cfd656336 (diff)
downloadpfsense-ad9148aefaa71bfda268780845b6d75d6f7d8d23.zip
pfsense-ad9148aefaa71bfda268780845b6d75d6f7d8d23.tar.gz
Allow for overhead and up maximum limit from 8 to 32, also only set it if its set to 4 or above. Fixes https://forum.pfsense.org/index.php?topic=78356.msg472781#msg472781
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/unbound.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/inc/unbound.inc b/etc/inc/unbound.inc
index 6ed6351..9fe32e4 100644
--- a/etc/inc/unbound.inc
+++ b/etc/inc/unbound.inc
@@ -95,16 +95,16 @@ function unbound_optimization() {
if (is_array($config['sysctl']) && is_array($config['sysctl']['item'])) {
foreach ($config['sysctl']['item'] as $tunable) {
if ($tunable['tunable'] == 'kern.ipc.maxsockbuf') {
- $so = floor(($tunable['value']/1024/1024)-1);
+ $so = floor(($tunable['value']/1024/1024)-4);
// Check to ensure that the number is not a negative
- if ($so > 0) {
- // Limit to 8MB, users might set maxsockbuf very high for other reasons.
+ if ($so >= 4) {
+ // Limit to 32MB, users might set maxsockbuf very high for other reasons.
// We do not want unbound to fail because of that.
- $so = min($so, 8);
+ $so = min($so, 32);
$optimization['so_rcvbuf'] = "so-rcvbuf: {$so}m";
- }
- else
+ } else {
unset($optimization['so_rcvbuf']);
+ }
}
}
}
@@ -682,4 +682,4 @@ function unbound_hosts_generate() {
unbound_control("reload");
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud