mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Prefer dnsmasq's host overrides when it's enabled. Ticket #5883
This commit is contained in:
parent
b76fd2a056
commit
efebd867ec
@ -295,10 +295,13 @@ 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";
|
||||
$hosts .= "::1 localhost localhost.{$syscfg['domain']}\n";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user