summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-03-12 21:07:28 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-03-12 21:09:55 -0300
commite691957fca78538aa7c23fcfe1dbf823d9624984 (patch)
tree1e664b36c0089141813a51ba74d5fb294ef54950
parent80271fb3087cba1f6ca228cc1ec81d391ec5c76b (diff)
downloadpfsense-e691957fca78538aa7c23fcfe1dbf823d9624984.zip
pfsense-e691957fca78538aa7c23fcfe1dbf823d9624984.tar.gz
Do not start filterdns during boot until a proper fix is done. Ticket #4296
-rw-r--r--etc/inc/filter.inc38
-rwxr-xr-xetc/rc.bootup2
2 files changed, 22 insertions, 18 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 2b6adb3..194f8d8 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -435,25 +435,27 @@ function filter_configure_sync($delete_states_if_needed = true) {
update_filter_reload_status(gettext("Starting up layer7 daemon"));
layer7_start_l7daemon();
- if(!empty($filterdns)) {
- @file_put_contents("{$g['varetc_path']}/filterdns.conf", implode("", $filterdns));
- unset($filterdns);
- if (isvalidpid("{$g['varrun_path']}/filterdns.pid"))
- sigkillbypid("{$g['varrun_path']}/filterdns.pid", "HUP");
- else {
- /*
- * FilterDNS has three debugging levels. The default choosen is 1.
- * Availabe are level 2 and greater then 2.
- */
- if (isset($config['system']['aliasesresolveinterval']) && is_numeric($config['system']['aliasesresolveinterval']))
- $resolve_interval = $config['system']['aliasesresolveinterval'];
- else
- $resolve_interval = 300;
- mwexec("/usr/local/sbin/filterdns -p {$g['varrun_path']}/filterdns.pid -i {$resolve_interval} -c {$g['varetc_path']}/filterdns.conf -d 1");
+ if (!platform_booting()) {
+ if(!empty($filterdns)) {
+ @file_put_contents("{$g['varetc_path']}/filterdns.conf", implode("", $filterdns));
+ unset($filterdns);
+ if (isvalidpid("{$g['varrun_path']}/filterdns.pid"))
+ sigkillbypid("{$g['varrun_path']}/filterdns.pid", "HUP");
+ else {
+ /*
+ * FilterDNS has three debugging levels. The default choosen is 1.
+ * Availabe are level 2 and greater then 2.
+ */
+ if (isset($config['system']['aliasesresolveinterval']) && is_numeric($config['system']['aliasesresolveinterval']))
+ $resolve_interval = $config['system']['aliasesresolveinterval'];
+ else
+ $resolve_interval = 300;
+ mwexec("/usr/local/sbin/filterdns -p {$g['varrun_path']}/filterdns.pid -i {$resolve_interval} -c {$g['varetc_path']}/filterdns.conf -d 1");
+ }
+ } else {
+ killbypid("{$g['varrun_path']}/filterdns.pid");
+ @unlink("{$g['varrun_path']}/filterdns.pid");
}
- } else {
- killbypid("{$g['varrun_path']}/filterdns.pid");
- @unlink("{$g['varrun_path']}/filterdns.pid");
}
/* run items scheduled for after filter configure run */
diff --git a/etc/rc.bootup b/etc/rc.bootup
index 1adbe15..ae1f8f6 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -447,6 +447,8 @@ unset($g['booting']);
/* If there are ipsec dynamic hosts try again to reload the tunnels as rc.newipsecdns does */
if ($ipsec_dynamic_hosts) {
vpn_ipsec_configure();
+}
+if ($ipsec_dynamic_hosts || !empty($filterdns)) {
filter_configure();
}
OpenPOWER on IntegriCloud