diff options
author | jim-p <jimp@pfsense.org> | 2012-05-29 10:50:46 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-05-29 10:51:14 -0400 |
commit | 84aea6061722bb3a4de8a024144650e2a55df3d3 (patch) | |
tree | 373a2a8f3c0f50a33ec852a33545872408fa88c5 /etc | |
parent | 454ea767609ea3e679e0de4ec795532e66c7ce47 (diff) | |
download | pfsense-84aea6061722bb3a4de8a024144650e2a55df3d3.zip pfsense-84aea6061722bb3a4de8a024144650e2a55df3d3.tar.gz |
Add a knob to tune the maximum number of tables that can be defined, the pf default of 1000 is too low for systems with >500 aliases.
Conflicts:
etc/inc/filter.inc
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/filter.inc | 5 | ||||
-rw-r--r-- | etc/inc/pfsense-utils.inc | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 2f2dc9f..dc21e26 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -254,10 +254,15 @@ function filter_configure_sync($delete_states_if_needed = true) { copy("{$g['tmp_path']}/rules.debug", "{$g['tmp_path']}/rules.debug.old"); $rules = ""; + if($config['system']['maximumtables'] <> "" && is_numeric($config['system']['maximumtables'])) { + /* User defined maximum table entries in Advanced menu. */ + $rules .= "set limit tables {$config['system']['maximumtables']}\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 .= "{$aliases} \n"; $rules .= "{$gateways} \n"; update_filter_reload_status(gettext("Setting up logging information")); diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 7ac1f4b..a9c2f1f 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1434,6 +1434,11 @@ function pfsense_default_state_size() { return $max_states; } +function pfsense_default_tables_size() { + $current = `pfctl -sm | grep ^tables | awk '{print $4};'`; + return $current; +} + function pfsense_default_table_entries_size() { $current = `pfctl -sm | grep table-entries | awk '{print $4};'`; return $current; |