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

DNS resolution fails from time to time when no IPv6 record is returned

Details

    • Watchers
    • Normal
    • sst_desktop_firmware_bootloaders
    • ssg_desktop
    • 20
    • 24
    • False
    • Hide

      None

      Show
      None
    • Unspecified
    • If docs needed, set a value
    • All

    Description

      Description of problem:

      When trying to resolve DNS names into IP addresses, the DNS code fails from time to time with the following error:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      error: ../../grub-core/net/dns.c:688:no DNS record found.
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      This happens when both IPv4 and IPv6 queries are performed against the DNS server (e.g. 8.8.8.8) but there is no IP returned for IPv6 query, as shown below:
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
      grub> net_del_dns 192.168.122.1
      grub> net_add_dns 8.8.8.8
      grub> net_nslookup ipv4.test-ipv6.com
      error: ../../grub-core/net/dns.c:688:no DNS record found.
      grub> net_nslookup ipv4.test-ipv6.com
      216.218.228.115
      -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------

      Digging into this, I found that the Grub code exits prematurely when the data->addresses buffer has been allocated in recv_hook(), even if there was no address returned last time recv_hook() executed.

      Version-Release number of selected component (if applicable):

      All grub2 releases

      How reproducible:

      See above.

      Steps to Reproduce:
      1. Network boot a UEFI system with grubx64.efi
      2. Change DNS server as above
      3. Repeatedly execute "net_nslookup ipv4.test-ipv6.com"

      Actual results:

      Sometimes error, sometimes "216.218.228.115"

      Expected results:

      Always "216.218.228.115" returned

      Attachments

        Activity

          People

            bootloader-eng-team bootloader -eng-team
            rhn-support-rmetrich Renaud Metrich
            RH Bugzilla Integration RH Bugzilla Integration
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: