hostctl strips ::0 off ipv6 addresses when adding any domain
alcroito opened this issue · comments
Describe the bug
My ubuntu 22.04 system has the following lines in /etc/hosts by default
# The following lines are desirable for IPv6 capable hosts
::1 localhost
::1 ip6-localhost
::1 ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Whenever hostctl is invoked to add any domain, the ::0
addresses get their 0 stripped.
hostctl add domains awesome my-awesome-ui.project.loc my-awesome-api.project.loc
and the resulting file ends up
# The following lines are desirable for IPv6 capable hosts
::1 localhost
::1 ip6-localhost
::1 ip6-loopback
fe00:: ip6-localnet # <------
ff00:: ip6-mcastprefix # <------
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
##################################################################
# Content under this line is handled by hostctl. DO NOT EDIT.
##################################################################
# profile.on awesome
127.0.0.1 my-awesome-ui.project.loc
127.0.0.1 my-awesome-api.project.loc
# end
Expected behavior
the ipv6 addresses do not get their 0 stripped
System (please complete the following information):
- OS: Linux
- Version: Ubuntu 22.04