summaryrefslogtreecommitdiff
path: root/data/templates/vyos-hostsd
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-02-29 22:08:29 +0100
committerChristian Breunig <christian@breunig.cc>2024-02-29 22:09:28 +0100
commit3712f28025a5bc99e941b5212091a2732b9f6d6c (patch)
tree81930f586c20b782d7fbf21408b0b107af54a5a7 /data/templates/vyos-hostsd
parenta2e1c850c4ea40056b80b11f2e3d06b49b2a6f71 (diff)
downloadvyos-1x-3712f28025a5bc99e941b5212091a2732b9f6d6c.tar.gz
vyos-1x-3712f28025a5bc99e941b5212091a2732b9f6d6c.zip
vyos-hostsd: T4270: resolve only hostname without domain name to 127.0.1.1
This is a fix for commit 665ae50729 ("vyos-hostsd: T4270: do not resolve local router FQDN to 127.0.1.1") as it made calls to sudo super slow due to: sudo: unable to resolve host vyos: System error To avoid the initial issue we only add the hostname without domain name, thus the FQDN is not resolved by powerdns.
Diffstat (limited to 'data/templates/vyos-hostsd')
-rw-r--r--data/templates/vyos-hostsd/hosts.j21
1 files changed, 1 insertions, 0 deletions
diff --git a/data/templates/vyos-hostsd/hosts.j2 b/data/templates/vyos-hostsd/hosts.j2
index 71fa335da..62ecf3ad0 100644
--- a/data/templates/vyos-hostsd/hosts.j2
+++ b/data/templates/vyos-hostsd/hosts.j2
@@ -4,6 +4,7 @@
# Local host
127.0.0.1 localhost
+127.0.1.1 {{ host_name }}
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback