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

InetAddress is not throwing UnknownHostException for some wrong IPv6 addresses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      linux

      Description

      On Linux RH 6.2(Kernel version 2.4.3) with build 62 InetAddress is accepting some wrong IPv6 addresses. For same address on Sol8/IASol8 its throwing UnknownHostException.

      Using following three addresses you can test this..

      ffe0:BAD:2:33:0040:5555:6666:7:

      ffe0::BAD:

      ffe0::BAD:2:33:0040:5555:6666:7


      How to reproduce:

      1 Take the attached GetIP.java

      2. Test with above addresses.

      I have pasted the output:

      on Solaris 8:
      ---------------

      java GetIP ffe0:BAD:2:33:0040:5555:6666:7:
      exp mesg ffe0:BAD:2:33:0040:5555:6666:7:
      java.net.UnknownHostException: ffe0:BAD:2:33:0040:5555:6666:7:
              at java.net.InetAddress.getAllByName0(InetAddress.java:778)
              at java.net.InetAddress.getAllByName0(InetAddress.java:748)
              at java.net.InetAddress.getAllByName(InetAddress.java:742)
              at GetIP.main(GetIP.java:11)

      on Linux RH6.2:
      ----------------

      java GetIP ffe0:BAD:2:33:0040:5555:6666:7:
      iadr length 1
      host name ffe0:BAD:2:33:0040:5555:6666:7:
      AFter getting iadr
      AFter getting niface
      network interface null
      ip address : [ffe0:bad:2:33:40:5555:6666:7]
       Host Name :ffe0:BAD:2:33:0040:5555:6666:7:
      Host aadd byte arr [B@5ff48b
      v6 address
      NOt org local scope
      working....

        Attachments

          Activity

            People

            Assignee:
            jccollet Jean-Christophe Collet (Inactive)
            Reporter:
            vakellasunw Venkata Akella (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: