firewall: pflog is doing strange things lately

Try to reload in case it can't open syslog and keep fully
reloading it to make sure that it stays operational.
This commit is contained in:
Franco Fichtner 2019-07-09 08:22:57 +02:00
parent e184a5e403
commit b2294eae1b
2 changed files with 6 additions and 7 deletions

View File

@ -97,15 +97,15 @@ function filter_rules_sort()
function filter_pflog_start($verbose = false)
{
if (isvalidpid('/var/run/filterlog.pid')) {
return;
}
if ($verbose) {
echo 'Starting PFLOG...';
flush();
}
if (isvalidpid('/var/run/filterlog.pid')) {
killbypid('/var/run/filterlog.pid', 'TERM', true);
}
mwexec('/usr/local/sbin/filterlog -i pflog0 -p /var/run/filterlog.pid');
if ($verbose) {
@ -281,8 +281,6 @@ function filter_configure_sync($verbose = false, $flush_states = false, $load_al
}
}
filter_pflog_start($verbose);
if ($verbose) {
echo 'Configuring firewall.';
flush();
@ -514,6 +512,8 @@ function filter_configure_sync($verbose = false, $flush_states = false, $load_al
echo "done.\n";
}
filter_pflog_start($verbose);
unlock($filterlck);
}

View File

@ -217,7 +217,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
/* time zone change first */
system_timezone_configure();
filter_pflog_start();
prefer_ipv4_or_ipv6();
system_hostname_configure();
system_hosts_generate();