-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
rhel-8.8.0
-
None
-
Important
-
rhel-sst-cs-plumbers
-
ssg_core_services
-
5
-
False
-
-
None
-
None
-
None
-
None
-
If docs needed, set a value
-
-
x86_64
-
None
Description of problem:
systemd_myhostname returns ipv6 address for local host even when ipv6 is
disabled
Version-Release number of selected component (if applicable):
glibc-2.28-225.el8.x86_64
systemd-libs-239-74.el8_8.x86_64
How reproducible:
Always
Steps to Reproduce:
1. Disable IPv6
- sysctl -w net.ipv6.conf.all.disable_ipv6=1
2. Set the host name to something not in /etc/hosts nor in DNS
- hostnamectl set-hostname nowhere
- hostname
nowhere - hostname -f
nowhere
3. Query the hosts database using the three services:
- getent -s files hosts nowhere
- getent -s dns hosts nowhere
- getent -s myhostname hosts nowhere
Actual results:
::1 nowhere localhost
Expected results:
The machine IPv4 address, e.g.
192.168.122.71 nowhere
Additional info:
Same results are seen on RHEL 9. It should not return an IPv6 address with
net.ipv6.conf.all.disable_ipv6=1.
Repeating the same test on a fully updated RHEL 7.9, we get
- getent -s myhostname hosts nowhere
192.168.122.71 nowhere