Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8170910

Need to use getifaddrs instead of getaddrinfo to get a host's own interface addresses.

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      os_x

      Description

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      Mac OS 10.12 or later

      A DESCRIPTION OF THE PROBLEM :
      I work on mDNSResponder at Apple. It can no longer be assumed that the interface address records are registered.

      Instead use the getifaddrs API to get interface addresses.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      On a Macintosh running 10.12 or later, if there are no apps that have a mDNS services registered (for instance, iTunes) and there are no services selected in the Sharing System Preferences, then the getaddrinfo will fail.

      To determine if a Macintosh has mDNS services registered, run this command from terminal window:
      dns-sd -lo -B _services._dns-sd._udp local

      If this succeeds, then you most likely have mDNS services registered:
      dns-sd -G v4v6 <local-host-name>





      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Just ping the local host name and you will see the bug.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Add your local hostname to the /etc/hosts file.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chegar Chris Hegarty
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: