diff options
author | Ermal <eri@pfsense.org> | 2010-12-03 18:50:08 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-12-03 18:50:08 +0000 |
commit | 5e86efe0bceeddc4fd434ed8fccadcd417b8ef3c (patch) | |
tree | a3027fcc29dbc9d8c5c1340d0a12809f61d83bbd /etc/inc | |
parent | 9ce96456a35cd5767e1d35887cb1bfa06391afe0 (diff) | |
download | pfsense-5e86efe0bceeddc4fd434ed8fccadcd417b8ef3c.zip pfsense-5e86efe0bceeddc4fd434ed8fccadcd417b8ef3c.tar.gz |
Actually make the other code correct.
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/filter.inc | 8 |
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"); } } |