(legacy) move default_state_size to filter.inc

This commit is contained in:
Ad Schellevis 2015-07-22 13:03:05 +00:00
parent 3fd45bad23
commit eb7e7a04f6
3 changed files with 15 additions and 13 deletions

View File

@ -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;
}
?>

View File

@ -574,19 +574,6 @@ function is_fqdn($fqdn) {
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.
*/

View File

@ -5,6 +5,7 @@ if(Connection_Aborted()) {
}
require_once("config.inc");
require_once("filter.inc");
require_once("pfsense-utils.inc");
function get_uptime_sec() {