RFR: 7100957 : Java doesn't correctly handle the SOCKS protocol when used over IPv6

Alan Bateman Alan.Bateman at oracle.com
Tue Jan 7 13:36:32 PST 2014


On 07/01/2014 12:29, Dimitar Mavrodiev wrote:
> Hi Alan,
>
> I've fixed that. Here's the webrev 
> https://googledrive.com/host/0B2CI6Ih--1t5bVVwbVlBRmpVMDg/4/index.html.
>
Thanks for the update, it seems to be okay now for IPv6 disabled case.

One thing I do see though is that the test fails intermittently on 
Windows (in my case Windows Server 2012) when IPv6 is enabled. The 
typical output is attached. I haven't dug into yet.

-Alan

[TestNG] Running:
   java/net/Socks/SocksIPv6Test.java

config SocksIPv6Test.setUp(): success
test SocksIPv6Test.testSocksOverIPv6(): failure
java.net.SocketException: Reply from SOCKS server has bad length
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:505)
         at java.net.Socket.connect(Socket.java:585)
         at java.net.Socket.connect(Socket.java:534)
         at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
         at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
         at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)
         at sun.net.www.http.HttpClient.New(HttpClient.java:308)
         at sun.net.www.http.HttpClient.New(HttpClient.java:326)
         at 
sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1122)
         at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1101)
         at 
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:942)
         at 
sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:940)
         at java.security.AccessController.doPrivileged(Native Method)
         at 
java.security.AccessController.doPrivileged(AccessController.java:713)
         at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:939)
         at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:886)
         at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1466)
         at 
sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:90)
         at 
sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1386)
         at 
sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1384)
         at java.security.AccessController.doPrivileged(Native Method)
         at 
java.security.AccessController.doPrivileged(AccessController.java:713)
         at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1383)
         at SocksIPv6Test.testSocksOverIPv6(SocksIPv6Test.java:133)



More information about the net-dev mailing list