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

java.net.Inet4Address.isLoopbackAddress() is inconsistent with rfc1122

    XMLWordPrintable

Details

    • beta
    • sparc
    • solaris_2.6

    Description



      Name: dfR10049 Date: 01/17/2001



      isLoopbackAddress() method of Inet4Address class is inconsistent with rfc1122.

      rfc1122, section 3.2.1.3 states :


         ...
                  (g) { 127, <any> }

                       Internal host loopback address. Addresses of this form
                       MUST NOT appear outside a host.
         ...

      So, any address like 127.x.x.x is loopback address. (That does not imply that
      all of these interfaces should be present)
      In the current implementation only 127.0.0.1 is treated as loopback address.

      Inet4Address.java (SCCS version: 1.3):
       
         ...
          private static final int loopback = 2130706433; /* 127.0.0.1 */
          public boolean isLoopbackAddress() {
      return address == loopback;
          }
        ...

      This implementation is inconsistent with rfc1122

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: