Skip to content

Commit

Permalink
vyos-hostsd: T4270: resolve only hostname without domain name to 127.…
Browse files Browse the repository at this point in the history
…0.1.1

This is a fix for commit 665ae50 ("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.

(cherry picked from commit 3712f28)
  • Loading branch information
c-po committed Apr 26, 2024
1 parent a5f847b commit b75e0ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/templates/vyos-hostsd/hosts.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Local host
127.0.0.1 localhost
127.0.1.1 {{ host_name }}{% if domain_name %}.{{ domain_name }} {{ host_name }}{% endif %}
127.0.1.1 {{ host_name }}

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
Expand Down

0 comments on commit b75e0ba

Please sign in to comment.