aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/unbound/unbound.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/config/unbound/unbound.inc b/config/unbound/unbound.inc
index 0ac88e8e..c3de2f88 100644
--- a/config/unbound/unbound.inc
+++ b/config/unbound/unbound.inc
@@ -650,11 +650,13 @@ function unbound_optimization() {
if ($tunable['tunable'] == 'kern.ipc.maxsockbuf') {
$so = floor(($tunable['value']/1024/1024)-1);
// Check to ensure that the number is not a negative
- if ($so > 0)
+ if ($so > 0) {
$optimization['so_rcvbuf'] = "so-rcvbuf: {$so}m";
- else
+ $optimization['so_sndbuf'] = "so-sndbuf: {$so}m";
+ } else {
unset($optimization['so_rcvbuf']);
-
+ unset($optimization['so_sndbuf']);
+ }
}
}
// Safety check in case kern.ipc.maxsockbuf is deleted.