From eb7e7a04f609d0107d506b5c1007d2e2e5f60406 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Wed, 22 Jul 2015 13:03:05 +0000 Subject: [PATCH] (legacy) move default_state_size to filter.inc --- src/etc/inc/filter.inc | 14 ++++++++++++++ src/etc/inc/pfsense-utils.inc | 13 ------------- src/www/includes/functions.inc.php | 1 + 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc index 17e70861e..5d45a2e87 100644 --- a/src/etc/inc/filter.inc +++ b/src/etc/inc/filter.inc @@ -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; +} + + + ?> diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index 5db33c87e..77d7d7d66 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -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. */ diff --git a/src/www/includes/functions.inc.php b/src/www/includes/functions.inc.php index 1a31104bb..d810a5946 100644 --- a/src/www/includes/functions.inc.php +++ b/src/www/includes/functions.inc.php @@ -5,6 +5,7 @@ if(Connection_Aborted()) { } require_once("config.inc"); +require_once("filter.inc"); require_once("pfsense-utils.inc"); function get_uptime_sec() {