summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-05-13 15:43:05 -0400
committerjim-p <jimp@pfsense.org>2010-05-13 15:46:07 -0400
commitfb586a1633ba53584dab6208a64f96798be4869d (patch)
treebe50843edc051ac4617a45d476300b3439d37c9f /etc
parentef021ff780bfae0d0188a051a0d284a33c7340c7 (diff)
downloadpfsense-fb586a1633ba53584dab6208a64f96798be4869d.zip
pfsense-fb586a1633ba53584dab6208a64f96798be4869d.tar.gz
Add a GUI field to let the user configure the maxium table entries size. Resolves #588
NOTE: Actual tables, not states.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc5
-rw-r--r--etc/inc/pfsense-utils.inc5
2 files changed, 10 insertions, 0 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index cab17d1..0b1e663 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -240,6 +240,11 @@ function filter_configure_sync() {
$rules .= "set limit states {$max_states}\n";
}
+ if($config['system']['maximumtableentries'] <> "" && is_numeric($config['system']['maximumtableentries'])) {
+ /* User defined maximum table entries in Advanced menu. */
+ $rules .= "set limit table-entries {$config['system']['maximumtableentries']}\n";
+ }
+
//$rules .= discover_pkg_rules("pfearly");
// Configure flowtable support if enabled.
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 3011ef9..703d421 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1463,6 +1463,11 @@ function pfsense_default_state_size() {
return $max_states;
}
+function pfsense_default_table_entries_size() {
+ $current = `pfctl -sm | grep table-entries | awk '{print $4};'`;
+ return $current;
+}
+
/* Compare the current hostname DNS to the DNS cache we made
* if it has changed we return the old records
* if no change we return true */
OpenPOWER on IntegriCloud