Skip to content

Commit

Permalink
unbound: make so-reuseport conditional upon RSS status
Browse files Browse the repository at this point in the history
We only ask the tunables configuration layer for the current value
which is likely going to match.  We could fetch the actual value
from the system but speed and priviledge separation concerns weigh
heavier.

PR: https://forum.opnsense.org/index.php?topic=24409.0
  • Loading branch information
fichtner committed Oct 26, 2021
1 parent f394d21 commit 84d6b2a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/etc/inc/plugins.inc.d/unbound.inc
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ EOD;
}
}

$so_reuseport = empty(system_sysctl_get()['net.inet.rss.enabled']) ? 'yes' : 'no';

$unboundconf = <<<EOD
##########################
# Unbound Configuration
Expand Down Expand Up @@ -322,7 +324,7 @@ do-ip6: {$do_ip6}
do-udp: yes
do-tcp: yes
do-daemonize: yes
so-reuseport: yes
so-reuseport: ${so_reuseport}
module-config: "{$module_config}"
cache-max-ttl: {$cache_max_ttl}
cache-min-ttl: {$cache_min_ttl}
Expand Down

0 comments on commit 84d6b2a

Please sign in to comment.