mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Put the FQDN first in /etc/hosts to make dnsmasq happy when reverse resolving hostnames. Make a special exception for localhost. Fixes #7771
This commit is contained in:
parent
fde09aa8e5
commit
0e78c2f544
@ -549,10 +549,11 @@ function system_hosts_generate() {
|
||||
$hosts_array = system_hosts_entries($dnsmasqcfg);
|
||||
foreach ($hosts_array as $host) {
|
||||
$hosts .= "{$host['ipaddr']}\t";
|
||||
if (!empty($host['name'])) {
|
||||
$hosts .= "{$host['name']} ";
|
||||
if ($host['name'] == "localhost") {
|
||||
$hosts .= "{$host['name']} {$host['fqdn']}";
|
||||
} else {
|
||||
$hosts .= "{$host['fqdn']} {$host['name']}";
|
||||
}
|
||||
$hosts .= "{$host['fqdn']}";
|
||||
$hosts .= "\n";
|
||||
}
|
||||
unset($hosts_array);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user