Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-6217

systemd_myhostname returns ipv6 address for local host even when ipv6 is disabled

Details

    • Major
    • sst_cs_plumbers
    • ssg_core_services
    • False
    • Hide

      None

      Show
      None
    • If docs needed, set a value

    Description

      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

      1. sysctl -w net.ipv6.conf.all.disable_ipv6=1

      2. Set the host name to something not in /etc/hosts nor in DNS

      1. hostnamectl set-hostname nowhere
      2. hostname
        nowhere
      3. hostname -f
        nowhere

      3. Query the hosts database using the three services:

      1. getent -s files hosts nowhere
      2. getent -s dns hosts nowhere
      3. 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

      1. getent -s myhostname hosts nowhere
        192.168.122.71 nowhere

      Attachments

        Activity

          People

            lnykryn@redhat.com Lukáš Nykrýn
            rhn-support-casantos Carlos Santos
            systemd maint mailing list systemd maint mailing list
            Frantisek Sumsal Frantisek Sumsal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: