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

Use reserved IP for java.net testing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 17
    • core-libs
    • None

      Some tests like test/jdk/java/net/Socket/B8312065.java use specific IPs (like 192.168.255.255) taking the assumption that the address is not going to be assigned. This doesn't always hold true, as 192.168.255.255 for example is a valid address.

      RFC 5737 [1] defines specific ranges of IP addresses that may are reserved for these exact purpose and that will never be assigned. Let's make sure to use an IP in this range, like 192.0.2.1 for example.

      The specific test test/jdk/java/net/Socket/B8312065.java was introduced with https://git.openjdk.org/jdk17u-dev/pull/1639.

      [1] https://www.rfc-editor.org/rfc/rfc5737

            luhenry Ludovic Henry
            luhenry Ludovic Henry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: