summaryrefslogtreecommitdiffstats
path: root/usr
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
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')
-rw-r--r--usr/local/www/includes/functions.inc.php6
-rwxr-xr-xusr/local/www/system_advanced.php2
2 files changed, 4 insertions, 4 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() {
diff --git a/usr/local/www/system_advanced.php b/usr/local/www/system_advanced.php
index f4c9bd4..b0adaa1 100755
--- a/usr/local/www/system_advanced.php
+++ b/usr/local/www/system_advanced.php
@@ -626,7 +626,7 @@ include("head.inc");
<br />
<strong>Maximum number of connections to hold in the firewall state table.</strong>
<br />
- <span class="vexpl">Note: Leave this blank for the default of 10000</span>
+ <span class="vexpl">Note: Leave this blank for the default. On your system the default size is: <?= pfsense_default_state_size() ?></span>
</td>
</tr>
<tr>
OpenPOWER on IntegriCloud