summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-12-14 21:22:25 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2010-12-14 21:22:25 -0700
commita5e64ca0a23ed39882dff83b6b58907345348139 (patch)
treee1ad351a12b2b11e470035b69fe9027f25121615
parentfb548cde595850914a7b0e792ba50024e1520c2d (diff)
downloadpfsense-a5e64ca0a23ed39882dff83b6b58907345348139.zip
pfsense-a5e64ca0a23ed39882dff83b6b58907345348139.tar.gz
Remove config lock for filter reload, since no config file reads or writes are happening here. Ticket #1071
-rw-r--r--etc/inc/filter.inc8
1 files changed, 1 insertions, 7 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index cc3a6a3..9e13ccf 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -185,9 +185,8 @@ function filter_configure_sync() {
global $config, $g, $after_filter_configure_run, $FilterIflist;
global $time_based_rules, $filterdns, $aliases;
- /* Use filter lock to not allow recursion and config lock to prevent changes during this run. */
+ /* Use filter lock to not allow concurrent filter reloads during this run. */
$filterlck = lock('filter', LOCK_EX);
- $configlck = lock('config');
filter_pflog_start();
@@ -242,7 +241,6 @@ function filter_configure_sync() {
update_filter_reload_status("Filter is disabled. Not loading rules.");
if($g['booting'] == true)
echo "done.\n";
- unlock($configlck);
unlock($filterlck);
return;
}
@@ -300,7 +298,6 @@ function filter_configure_sync() {
if(!file_put_contents("{$g['tmp_path']}/rules.debug", $rules, LOCK_EX)) {
log_error("WARNING: Could not write new rules!");
- unlock($configlck);
unlock($filterlck);
return;
}
@@ -339,7 +336,6 @@ function filter_configure_sync() {
file_notice("filter_load", "There were error(s) loading the rules: {$rules_error} {$line_error}", "Filter Reload", "");
log_error("There were error(s) loading the rules: {$rules_error} - {$line_error}");
update_filter_reload_status("There were error(s) loading the rules: {$rules_error} - {$line_error}");
- unlock($configlck);
unlock($filterlck);
return;
}
@@ -387,8 +383,6 @@ function filter_configure_sync() {
fclose($fda);
}
- unlock($configlck);
-
if(file_exists("{$g['tmp_path']}/commands.txt")) {
mwexec("sh {$g['tmp_path']}/commands.txt &");
unlink("{$g['tmp_path']}/commands.txt");
OpenPOWER on IntegriCloud