summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-02-11 17:57:00 -0600
committerChris Buechler <cmb@pfsense.org>2016-02-11 17:57:00 -0600
commitd6fa0b47f9ae16f0b615a38c06818d2536290bd2 (patch)
tree318138406ca86264e45b8feeea336da058c141d9 /src
parentdf074d23755f291d85472534a77a1d4adc68e5f3 (diff)
downloadpfsense-d6fa0b47f9ae16f0b615a38c06818d2536290bd2.zip
pfsense-d6fa0b47f9ae16f0b615a38c06818d2536290bd2.tar.gz
Prefer dnsmasq's host overrides when it's enabled. Ticket #5883
Diffstat (limited to 'src')
-rw-r--r--src/etc/inc/system.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc
index 89d38cc..21f166b 100644
--- a/src/etc/inc/system.inc
+++ b/src/etc/inc/system.inc
@@ -336,10 +336,12 @@ function system_hosts_generate() {
}
$syscfg = $config['system'];
- if (isset($config['unbound']) && isset($config['unbound']['enable'])) {
- $dnsmasqcfg = $config['unbound'];
- } else {
+ // prefer dnsmasq for hosts generation where it's enabled. It relies
+ // on hosts for name resolution of its overrides, unbound does not.
+ if (isset($config['dnsmasq']) && isset($config['dnsmasq']['enable'])) {
$dnsmasqcfg = $config['dnsmasq'];
+ } else {
+ $dnsmasqcfg = $config['unbound'];
}
$hosts = "127.0.0.1 localhost localhost.{$syscfg['domain']}\n";
OpenPOWER on IntegriCloud