summaryrefslogtreecommitdiffstats
path: root/etc/inc/filter.inc
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2007-10-17 23:51:26 +0000
committerBill Marquette <billm@pfsense.org>2007-10-17 23:51:26 +0000
commit639aaa954cc2c87aa0d85fef1659d3f0c5afdcb9 (patch)
tree03ff1dea7673eb4dced6be43c8fd6edbe945eb86 /etc/inc/filter.inc
parent468b0d65e76d31b6faa9f1d46c2f5e655d91d7a6 (diff)
downloadpfsense-639aaa954cc2c87aa0d85fef1659d3f0c5afdcb9.zip
pfsense-639aaa954cc2c87aa0d85fef1659d3f0c5afdcb9.tar.gz
MFC of change [19782] per request from sullrich@
Scale state table size with memory, never allocate more than 10% system ram, this leads to 12K states on 128M and 102K on 1G systems - this should be a good default
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r--etc/inc/filter.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 00cfc93..653ccd7 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -177,6 +177,9 @@ function filter_configure_sync() {
if ($config['system']['maximumstates'] <> "" && is_numeric($config['system']['maximumstates'])) {
/* User defined maximum states in Advanced menu. */
$rules .= "set limit states {$config['system']['maximumstates']}\n";
+ } else {
+ $max_states = pfsense_default_state_size();
+ $rules .= "set limit states {$max_states}\n";
}
$rules .= "\n";
OpenPOWER on IntegriCloud