summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-12-03 18:50:08 +0000
committerErmal <eri@pfsense.org>2010-12-03 18:50:08 +0000
commit5e86efe0bceeddc4fd434ed8fccadcd417b8ef3c (patch)
treea3027fcc29dbc9d8c5c1340d0a12809f61d83bbd /etc/inc
parent9ce96456a35cd5767e1d35887cb1bfa06391afe0 (diff)
downloadpfsense-5e86efe0bceeddc4fd434ed8fccadcd417b8ef3c.zip
pfsense-5e86efe0bceeddc4fd434ed8fccadcd417b8ef3c.tar.gz
Actually make the other code correct.
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/filter.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index cbe2910..8df7b48 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -73,14 +73,14 @@ function flowtable_configure() {
if($config['system']['maximumstates'] <> "" && is_numeric($config['system']['maximumstates']))
$maxstates = $config['system']['maximumstates'];
else
- $maxstates = "150000";
+ $maxstates = 150000;
// nmbflows cpu count * ($maxstates * 2)
- $cpus = trim(`/sbin/sysctl kern.smp.cpus | /usr/bin/cut -d' ' -f2`);
+ $cpus = trim(`/sbin/sysctl -n kern.smp.cpus`, " \n");
$nmbflows = ($cpus*($maxstates*2));
// Flowtable currently only works on 8.0
if(get_freebsd_version() == "8") {
- mwexec("/sbin/sysctl net.inet.flowtable.nmbflows={$config['system']['maximumstates']}");
- mwexec("/sbin/sysctl net.inet.ip.output_flowtable_size={$nmbflows}");
+ mwexec("/sbin/sysctl net.inet.flowtable.nmbflows={$nmbflows}");
+ mwexec("/sbin/sysctl net.inet.ip.output_flowtable_size={$maxstates}");
mwexec("/sbin/sysctl net.inet.flowtable.enable=1");
}
}
OpenPOWER on IntegriCloud