bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/35845] New: Socket.connect() succeeds when it shouldn't


From: az at angryziber dot com
Subject: [Bug classpath/35845] New: Socket.connect() succeeds when it shouldn't
Date: 6 Apr 2008 15:44:24 -0000

I am the primary developer of Angry IP Scanner (www.azib.net), a Java
applications that pushes Java Sockets to their limits.

While testing the program with GNU Java, I found that sometimes it erroneously
reports unassigned IP addresses as beign alive hosts (this doesn't happen with
Sun Java or OpenJDK).

The problem is that Socket.connect(InetSocketAddress, int) always succeeds in
my local network if the underlying host pointed to by the InetAddress doesn't
exist. After the connect() returns, you can even try socket.isConnected() and
it will return true!

Expected behaviour: SocketTimeoutException or any other SocketException

I have analyzed the traffic with Wireshark and no TCP packets are sent at all,
only ARP frames, which of course don't return anything.

Here is the code that reproduces the problem:
https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk/src/net/azib/ipscan/core/net/TCPPinger.java

Note: if the host is up, but the port is closed, ConnectException is thrown as
expected. The problems seems to affect only unassigned IP addresses.


-- 
           Summary: Socket.connect() succeeds when it shouldn't
           Product: classpath
           Version: 0.96.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: az at angryziber dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35845





reply via email to

[Prev in Thread] Current Thread [Next in Thread]