summaryrefslogtreecommitdiffstats
path: root/usr/local/www/includes
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 /usr/local/www/includes
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 'usr/local/www/includes')
-rw-r--r--usr/local/www/includes/functions.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php
index 7cb93fb..21a89f3 100644
--- a/usr/local/www/includes/functions.inc.php
+++ b/usr/local/www/includes/functions.inc.php
@@ -71,14 +71,14 @@ function get_pfstate() {
global $config;
$matches = "";
if (isset($config['system']['maximumstates']) and $config['system']['maximumstates'] > 0)
- $maxstates="/{$config['system']['maximumstates']}";
+ $maxstates="{$config['system']['maximumstates']}";
else
- $maxstates="/10000";
+ $maxstates=pfsense_default_state_size();
$curentries = `/sbin/pfctl -si |grep current`;
if (preg_match("/([0-9]+)/", $curentries, $matches)) {
$curentries = $matches[1];
}
- return $curentries . $maxstates;
+ return $curentries . "/" . $maxstates;
}
function has_temp() {
OpenPOWER on IntegriCloud