Commit d2e584a9 authored by Ad Schellevis's avatar Ad Schellevis Committed by Franco Fichtner

(legacy) move default_state_size to filter.inc

parent 00f09981
...@@ -3552,4 +3552,18 @@ function filter_get_antilockout_ports($wantarray = false) { ...@@ -3552,4 +3552,18 @@ function filter_get_antilockout_ports($wantarray = false) {
} }
function default_state_size()
{
/* get system memory amount */
$memory = get_memory();
$physmem = $memory[0];
/* Be cautious and only allocate 10% of system memory to the state table */
$max_states = (int) ($physmem/10)*1000;
return $max_states;
}
?> ?>
...@@ -574,19 +574,6 @@ function is_fqdn($fqdn) { ...@@ -574,19 +574,6 @@ function is_fqdn($fqdn) {
return($hostname); return($hostname);
} }
function default_state_size()
{
/* get system memory amount */
$memory = get_memory();
$physmem = $memory[0];
/* Be cautious and only allocate 10% of system memory to the state table */
$max_states = (int) ($physmem/10)*1000;
return $max_states;
}
/* /*
* load_crypto() - Load crypto modules if enabled in config. * load_crypto() - Load crypto modules if enabled in config.
*/ */
......
...@@ -5,6 +5,7 @@ if(Connection_Aborted()) { ...@@ -5,6 +5,7 @@ if(Connection_Aborted()) {
} }
require_once("config.inc"); require_once("config.inc");
require_once("filter.inc");
require_once("pfsense-utils.inc"); require_once("pfsense-utils.inc");
function get_uptime_sec() { function get_uptime_sec() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment