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

java.net.Inet4Address.isMCLinkLocal() works incorrectly

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description



      Name: dfR10049 Date: 01/19/2001



      isMCLinkLocal() method of Inet4Address class works incorrectly.

      According to rfc2365 IPv4 prefix for multicast addresses with link-local scope is:
      224.0.0/24. But method implementation has typo:

      Inet4Address.java:

          public boolean isMCLinkLocal() {
      // 224.0.0/24 prefix and ttl == 1
                 ^^^
      return (((address >>> 24) & 0xFF) == 244)
                                                   ^^^ - typo!
      && (((address >>> 16) & 0xFF) == 0)
      && (((address >>> 8) & 0xFF) == 0);
          }

      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            ywangsunw Yingxian Wang (Inactive)
            Reporter:
            fdasunw Fda Fda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: