-
Bug
-
Resolution: Fixed
-
P3
-
8u91, 9
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8183739 | 8u161 | Robert Mckenna | P3 | Resolved | Fixed | b01 |
JDK-8166631 | 8u152 | Robert Mckenna | P3 | Resolved | Fixed | b01 |
JDK-8167049 | 8u121 | Robert Mckenna | P3 | Resolved | Fixed | b03 |
JDK-8167044 | 8u112 | Robert Mckenna | P3 | Resolved | Fixed | b31 |
JDK-8166779 | 8u102 | Robert Mckenna | P3 | Resolved | Fixed | b35 |
JDK-8192476 | emb-8u161 | Robert Mckenna | P3 | Resolved | Fixed | b01 |
JDK-8167885 | emb-8u121 | Robert Mckenna | P3 | Resolved | Fixed | b03 |
JDK-8259458 | 7u301 | Robert Mckenna | P3 | Resolved | Fixed | b01 |
JDK-8254768 | 7u291 | Robert Mckenna | P3 | Resolved | Fixed | b03 |
JDK-8255874 | 7u281 | Robert Mckenna | P3 | Closed | Fixed | b33 |
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) Client VM (build 25.91-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
Microsoft Windows [Version 10.0.10586]
A DESCRIPTION OF THE PROBLEM :
InetAddress.isReachable reports some non existing IP addresses as reachable. Java releases 1.8.0_73 and earlier do not exhibit this problem which had been reported in
REGRESSION. Last worked in version 8u73
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) Client VM (build 25.73-b02, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached program with Java of versions 1.8.0_73 and 1.8.0_91 and enter a random IP address in the IP Address text field followed by an Enter key or a click on the Ping button. The result is shown in the text area.
Examples of the IP addresses:
10.11.1.2
173.168.2.1
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Both versions of Java should show those IP addresses as "NOT an active host".
ACTUAL -
Java version 1.8.0_73 shows those IP addresses as NOT active and 1.8.0_91 as active.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.Dimension;
import java.io.IOException;
import java.net.InetAddress;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;
public class TestPing extends JFrame {
public TestPing() {
setTitle(getClass().getSimpleName() + " " + System.getProperty("java.version"));
setDefaultCloseOperation(EXIT_ON_CLOSE);
JTextArea textArea = new JTextArea();
textArea.setEditable(false);
JScrollPane scrollPane = new JScrollPane(textArea);
scrollPane.setPreferredSize(new Dimension(400, 300));
getContentPane().add(scrollPane, BorderLayout.CENTER);
JPanel panel = new JPanel();
getContentPane().add(panel, BorderLayout.NORTH);
JLabel lblIpAddress = new JLabel("IP Address");
panel.add(lblIpAddress);
JTextField textField = new JTextField();
panel.add(textField);
textField.setColumns(11);
JButton button = new JButton("Ping");
panel.add(button);
button.addActionListener((e) -> {
try {
Cursor tfCursor = textField.getCursor();
textField.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
InetAddress address = InetAddress.getByName(textField.getText());
boolean reachable = address.isReachable(5000);
textArea.append(address + " machine is " + (reachable ? "" : "NOT ") + "an active host\n");
textField.setCursor(tfCursor);
setCursor(Cursor.getDefaultCursor());
}
catch (IOException ex) {
textArea.append("Error: " + ex.getMessage() + "\n");
}
});
textField.addActionListener((e) -> {
button.doClick();
});
}
public static void main(String[] args) {
TestPing test = new TestPing();
test.pack();
test.setLocationRelativeTo(null);
test.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Using Java of version 1.8.0_73.
- backported by
-
JDK-8166631 InetAddress.isReachable returns true for non existing IP addresses
- Resolved
-
JDK-8166779 InetAddress.isReachable returns true for non existing IP addresses
- Resolved
-
JDK-8167044 InetAddress.isReachable returns true for non existing IP addresses
- Resolved
-
JDK-8167049 InetAddress.isReachable returns true for non existing IP addresses
- Resolved
-
JDK-8167885 InetAddress.isReachable returns true for non existing IP addresses
- Resolved
-
JDK-8183739 InetAddress.isReachable returns true for non existing IP addresses
- Resolved
-
JDK-8192476 InetAddress.isReachable returns true for non existing IP addresses
- Resolved
-
JDK-8254768 InetAddress.isReachable returns true for non existing IP addresses
- Resolved
-
JDK-8259458 InetAddress.isReachable returns true for non existing IP addresses
- Resolved
-
JDK-8255874 InetAddress.isReachable returns true for non existing IP addresses
- Closed
- duplicates
-
JDK-8254157 InetAddress isReachable returns false for reachable known host
- Closed
- relates to
-
JDK-8254157 InetAddress isReachable returns false for reachable known host
- Closed