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

Default multicast interface on Mac

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b165
    • OS:
      os_x
    • Verification:
      Verified

      Backports

        Description

        Because of some peculiarities on Mac the original Mac port brought some code that attempts to determine the default network interface ( on Mac only ). In all cases, on recent OS and hardware, it now finds the Apple peer-to-peer interface, awdl0, which is almost always the wrong answer. This is fragile code, and using the more modern APIs that support specifying an interface will avoid most of the problems, but it is alas still used in many cases. A quick internet search shows numerous reports of issues around this.

        It is possible for the heuristic to do a little better ( but not too much ), by selecting an interface that supports both IPv4 and IPv6, rather than just returning the first reasonable one it encounters.

        Note: this it not a problem when joining a group using the joinGroup method that accepts a NetworkInterface ( to join the group on ), or using the new NIO MulticastChannel interface. The MulticastSocket.joinGroup(InetAddress) are very much legacy, and should probably be deprecated at some point in the near future.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                chegar Chris Hegarty
                Reporter:
                chegar Chris Hegarty
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: