diff options
author | Ermal <eri@pfsense.org> | 2013-08-06 08:26:24 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-08-06 08:26:24 +0000 |
commit | 71549fa70975d30cf2fdb0275da8744b40c8ee49 (patch) | |
tree | 6adafcdf0a8b7359811039409d89b0520af8d317 /etc/inc/filter.inc | |
parent | 445518827846a00a1a4b5bb02a20895b76aa537d (diff) | |
download | pfsense-71549fa70975d30cf2fdb0275da8744b40c8ee49.zip pfsense-71549fa70975d30cf2fdb0275da8744b40c8ee49.tar.gz |
Try to do the loading operations as close as possible to avoid any issues coming from it
Diffstat (limited to 'etc/inc/filter.inc')
-rw-r--r-- | etc/inc/filter.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc index 55c29ce..901f7d9 100644 --- a/etc/inc/filter.inc +++ b/etc/inc/filter.inc @@ -298,9 +298,6 @@ function filter_configure_sync($delete_states_if_needed = true) { $rules .= discover_pkg_rules("filter"); - @file_put_contents("{$g['tmp_path']}/rules.limits", $limitrules); - mwexec("/sbin/pfctl -f {$g['tmp_path']}/rules.limits"); - if (!@file_put_contents("{$g['tmp_path']}/rules.debug", $rules, LOCK_EX)) { log_error("WARNING: Could not write new rules!"); unlock($filterlck); @@ -308,12 +305,15 @@ function filter_configure_sync($delete_states_if_needed = true) { } unset($rules, $limitrules); + unset($rules_loading, $rules_error); + + @file_put_contents("{$g['tmp_path']}/rules.limits", $limitrules); + mwexec("/sbin/pfctl -f {$g['tmp_path']}/rules.limits"); if(isset($config['system']['developerspew'])) { $mt = microtime(); echo "pfctl being called at $mt\n"; } - unset($rules_loading, $rules_error); $_grbg = exec("/sbin/pfctl -o basic -f {$g['tmp_path']}/rules.debug 2>&1", $rules_error, $rules_loading); if(isset($config['system']['developerspew'])) { $mt = microtime(); |