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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 8u112
    • Fix Version/s: None
    • Component/s: core-libs
    • 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 :
      t looks like the java api "InetAddress.getLocalHost()" is doing the wrong thing.
      The API seems to be using either getaddrinfo or gethostbyname to get a host’s own interface addresses. This is no longer supported. Please switch to using getifaddrs.



      REGRESSION. Last worked in version 8u112

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      To reproduce this problem on a Macintosh running 10.12 or later:
      1.) Uncheck all services in the Sharing System Preferences.
      2.) Toggle your ethernet and wifi connections to flush the DNS auth cache.
      2.) Ping your host in a terminal window using its own local host name and you will see that it fails (ex. using my local host name, “ping Sycamore.local.”).


      REPRODUCIBILITY :
      This bug can be reproduced often.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psonal Pallavi Sonal
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: