mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
filter: add more reload progress; closes #526
This commit is contained in:
parent
52b95b80c0
commit
9d372e0c22
@ -339,7 +339,7 @@ function filter_configure()
|
||||
*/
|
||||
if (!file_exists("/var/run/booting")) {
|
||||
configd_run('filter reload');
|
||||
if ( !empty($config['hasync']['synchronizetoip'])) {
|
||||
if (!empty($config['hasync']['synchronizetoip'])) {
|
||||
configd_run('filter sync restart');
|
||||
}
|
||||
}
|
||||
@ -500,6 +500,7 @@ function filter_configure_sync($verbose = false)
|
||||
update_filter_reload_status(gettext("Setting up SCRUB information"));
|
||||
$rules .= filter_generate_scrubing($FilterIflist);
|
||||
$rules .= "\n";
|
||||
update_filter_reload_status(gettext("Generating rules"));
|
||||
$rules .= $fw->anchorToText('nat,binat,rdr', 'head');
|
||||
$rules .= "{$natrules}\n";
|
||||
$rules .= $fw->anchorToText('nat,binat,rdr', 'tail');
|
||||
@ -511,6 +512,8 @@ function filter_configure_sync($verbose = false)
|
||||
|
||||
unset($aliases, $gateways, $natrules, $pfrules);
|
||||
|
||||
update_filter_reload_status(gettext("Executing packet filter reload"));
|
||||
|
||||
// Copy rules.debug to rules.debug.old
|
||||
if (file_exists('/tmp/rules.debug')) {
|
||||
@copy('/tmp/rules.debug', '/tmp/rules.debug.old');
|
||||
@ -579,6 +582,8 @@ function filter_configure_sync($verbose = false)
|
||||
$_grbg = exec('/sbin/pfctl -t bogonsv6 -T kill 2>/dev/null');
|
||||
}
|
||||
|
||||
update_filter_reload_status(gettext("Reloading filterdns daemon"));
|
||||
|
||||
if (!empty($filterdns)) {
|
||||
@file_put_contents('/var/etc/filterdns.conf', implode('', $filterdns));
|
||||
unset($filterdns);
|
||||
@ -600,6 +605,8 @@ function filter_configure_sync($verbose = false)
|
||||
killbypid('/var/run/filterdns.pid');
|
||||
}
|
||||
|
||||
update_filter_reload_status(gettext("Flushing schedule state"));
|
||||
|
||||
/* run items scheduled for after filter configure run */
|
||||
foreach ($after_filter_configure_run as $afcr) {
|
||||
mwexecf('/sbin/pfctl -T flush -t %s', $afcr);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user