diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-07-12 14:18:39 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-07-12 14:18:39 -0400 |
commit | 79c2e54a8c5a411947687ac40bb691d91c44a85a (patch) | |
tree | a728ff73b89e2884c4e162aecb408651ab746a34 | |
parent | e630feeeff5586f5e6d07fd20ada0efcf64f3a53 (diff) | |
download | pfsense-79c2e54a8c5a411947687ac40bb691d91c44a85a.zip pfsense-79c2e54a8c5a411947687ac40bb691d91c44a85a.tar.gz |
Oops, we do not need to reboot to set nmbflows
-rw-r--r-- | etc/inc/filter.inc | 14 | ||||
-rw-r--r-- | usr/local/www/system_advanced_network.php | 1 |
2 files changed, 4 insertions, 11 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 31570d0..eaaa851 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -58,16 +58,8 @@ function flowtable_configure() { else $maxstates = "150000"; // nmbflows cpu count * ($maxstates * 2) - $cpus = trim(`sysctl kern.smp.cpus | cut -d' ' -f2`); + $cpus = trim(`/usr/sbin/sysctl kern.smp.cpus | /usr/bin/cut -d' ' -f2`); $nmbflows = ($cpus*($maxstates*2)); - if(!file_exists("/boot/loader.conf")) - touch("/boot/loader.conf"); - $loader_conf_nmbflows = trim(`cat /boot/loader.conf | grep flowtable_size | cut -d'=' -f2`); - if($loader_conf_nmbflows <> $nmbflows) { - $loader_conf = trim(`cat /boot/loader_conf | grep -v nmbflows`); - $loader_conf .= "\nnet.inet.ip.output_flowtable_size={$nmbflows}\n"; - file_put_contents("/boot/loader.conf", $loader_conf); - } // Is flowtable enabled? if($config['system']['flowtable']) $flowtable_enable = 1; @@ -75,8 +67,10 @@ function flowtable_configure() { $flowtable_enable = 0; // Flowtable currently only works on 8.0 if(get_freebsd_version() == "8") { - if($flowtable_enable == 1) + if($flowtable_enable == 1) { mwexec("/usr/sbin/sysctl net.inet.flowtable.nmbflows={$config['system']['maximumstates']}"); + mwexec("/usr/sbin/sysctl net.inet.ip.output_flowtable_size={$nmbflows}"); + } mwexec("/usr/sbin/sysctl net.inet.flowtable.emable={$flowtable_enable}"); } } diff --git a/usr/local/www/system_advanced_network.php b/usr/local/www/system_advanced_network.php index b25c1aa..81b4d4d 100644 --- a/usr/local/www/system_advanced_network.php +++ b/usr/local/www/system_advanced_network.php @@ -255,7 +255,6 @@ function enable_change(enable_over) { <strong>Enable flowtable support</strong><br> Enables infrastructure for caching flows as a means of accelerating L3 and L2 lookups as well as providing stateful load balancing when used with RADIX_MPATH.<br/> - <b>NOTE:</b> If you change the state limit with flowtable enabled, you must reboot pfSense for the flowtable changes to take effect. </td> </tr> <?php endif; ?> |