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

2014-01-14 Thread Chris Hegarty
On 14 Jan 2014, at 10:53, Chris Hegarty wrote: > On 14 Jan 2014, at 10:51, Alan Bateman wrote: > >> On 14/01/2014 08:28, Chris Hegarty wrote: >>> On 13 Jan 2014, at 19:29, Chris Hegarty wrote: >>> On 13 Jan 2014, at 19:23, Dimitar Mavrodiev wrote: > Hi Chris, > > I c

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

2014-01-14 Thread Chris Hegarty
On 14 Jan 2014, at 10:51, Alan Bateman wrote: > On 14/01/2014 08:28, Chris Hegarty wrote: >> On 13 Jan 2014, at 19:29, Chris Hegarty wrote: >> >>> On 13 Jan 2014, at 19:23, Dimitar Mavrodiev wrote: >>> Hi Chris, I can't open the link, but yet I wouldn't mind if you folded your

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

2014-01-14 Thread Alan Bateman
On 14/01/2014 08:28, Chris Hegarty wrote: On 13 Jan 2014, at 19:29, Chris Hegarty wrote: On 13 Jan 2014, at 19:23, Dimitar Mavrodiev wrote: Hi Chris, I can't open the link, but yet I wouldn't mind if you folded your patch into mine. How embarrassing. Our public facing server is temporari

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

2014-01-14 Thread Dimitar Mavrodiev
Hi Chris, I agree with those changes. Thank you and Alan for sponsoring this patch. On Tue, Jan 14, 2014 at 10:28 AM, Chris Hegarty wrote: > On 13 Jan 2014, at 19:29, Chris Hegarty wrote: > > > On 13 Jan 2014, at 19:23, Dimitar Mavrodiev > wrote: > > > >> Hi Chris, > >> > >> I can't open the

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

2014-01-14 Thread Chris Hegarty
On 13 Jan 2014, at 19:29, Chris Hegarty wrote: > On 13 Jan 2014, at 19:23, Dimitar Mavrodiev wrote: > >> Hi Chris, >> >> I can't open the link, but yet I wouldn't mind if you folded your patch into >> mine. > > How embarrassing. Our public facing server is temporarily offline so I copied >

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

2014-01-13 Thread Chris Hegarty
Hi Dimitar, Thank you for following up with this. I came to the same conclusion as you earlier today, though I noticed it because the test SocksServer was sending a single byte at a time, for the initial reply. I took your latest patch and applied a few minor cleanups, as follows: http://t4.i

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

2014-01-13 Thread Dimitar Mavrodiev
Hi Alan, I believe to have found and fixed what was causing the failures on Windows. Here's the webrev https://googledrive.com/host/0B2CI6Ih--1t5bVVwbVlBRmpVMDg/5/index.html. I modified java.net.SocksSocketImpl#readSocksReply(..) so that it doesn't give up on reading after the 3rd attempt, but in

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

2014-01-13 Thread Dimitar Mavrodiev
Hi Chris, I can't open the link, but yet I wouldn't mind if you folded your patch into mine. Thanks, Dimitar Sent from my mobile device. On Jan 13, 2014 9:11 PM, "Chris Hegarty" wrote: > Hi Dimitar, > > Thank you for following up with this. I came to the same conclusion as you > earlier today,

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

2014-01-13 Thread Chris Hegarty
On 13 Jan 2014, at 19:23, Dimitar Mavrodiev wrote: > Hi Chris, > > I can't open the link, but yet I wouldn't mind if you folded your patch into > mine. How embarrassing. Our public facing server is temporarily offline so I copied the webrev to a temporary server just to verify it, then obviou

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

2014-01-11 Thread Dimitar Mavrodiev
Hi Alan, I finally had the chance to put together a windows build environment(Win7) and I'm now seeing the same error crop up every once in a while. To isolate the problem I replaced the socks server (jdk/test/java/net/Socks/SocksServer.java) I've been using in my test with JSocks and the test no

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

2014-01-08 Thread Dimitar Mavrodiev
Unfortunately I don't have a Windows environment. I'll try to setup one and look into this. -Dimitar On Tue, Jan 7, 2014 at 11:36 PM, Alan Bateman wrote: > On 07/01/2014 12:29, Dimitar Mavrodiev wrote: > >> Hi Alan, >> >> I've fixed that. Here's the webrev https://googledrive.com/host/ >> 0B2CI

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

2014-01-07 Thread Alan Bateman
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 intermitt

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

2014-01-07 Thread Dimitar Mavrodiev
Hi Alan, I've fixed that. Here's the webrev https://googledrive.com/host/0B2CI6Ih--1t5bVVwbVlBRmpVMDg/4/index.html. I've made some changes in the test to ensure that the inet6 address family is available, there's also a flag controlling if the test should run. It now runs if the IPv6 stack is ava

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

2014-01-07 Thread Alan Bateman
On 06/01/2014 16:39, Dimitar Mavrodiev wrote: Ok, better safe than sorry. Here's the webrev https://googledrive.com/host/0B2CI6Ih--1t5bVVwbVlBRmpVMDg/3/index.html. Can you verify that it passes okay when you run jtreg with -vmoption:-Djava.net.preferIPv4Stack=true . I ask because I don't see a

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

2014-01-06 Thread Dimitar Mavrodiev
The jtreg version I am using(4.1 fcs b05) seems to be correctly handling it. What jtreg version should I be using? On Mon, Jan 6, 2014 at 5:52 PM, Alan Bateman wrote: > On 06/01/2014 15:21, Dimitar Mavrodiev wrote: > >> Thanks, Chris. >> >> I've removed the dependency on the internal HttpServer.

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

2014-01-06 Thread Dimitar Mavrodiev
Hi Alan, I wasn't aware that tests might run on machines without the IPv6 stack. Now the test is skipped should there be no IPv6 address configured on the loopback iface. I've also expanded the test to cover the case of DOMAIN_NAME, but I came across some infrastructure problems. It turned out th

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

2014-01-06 Thread Chris Hegarty
The source changes look good to me too. I see Alan has commented on the test, and I agree. Trivially, can you also remove the dependency on the old internal HttpServer, and use the newer com.sun.net.httpserver API. It is easier to user, and more robust. You can see an example here [1]. -Chri

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

2014-01-06 Thread Chris Hegarty
On 06/01/14 16:05, Dimitar Mavrodiev wrote: The jtreg version I am using(4.1 fcs b05) seems to be correctly handling it. What jtreg version should I be using? See https://bugs.openjdk.java.net/browse/JDK-8026362 for a an example of this. Did you try to run your test without ::1 enabled? -Ch

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

2014-01-06 Thread Alan Bateman
On 06/01/2014 15:21, Dimitar Mavrodiev wrote: Thanks, Chris. I've removed the dependency on the internal HttpServer. Here's another webrev https://googledrive.com/host/0B2CI6Ih--1t5bVVwbVlBRmpVMDg/2/index.html. I'm not 100% sure how jtreg handles TestNG tests throwing SkipException. If it doe

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

2014-01-06 Thread Dimitar Mavrodiev
Thanks, Chris. I've removed the dependency on the internal HttpServer. Here's another webrev https://googledrive.com/host/0B2CI6Ih--1t5bVVwbVlBRmpVMDg/2/index.html. Best, Dimitar On Mon, Jan 6, 2014 at 4:18 PM, Chris Hegarty wrote: > The source changes look good to me too. > > I see Alan has c

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

2014-01-06 Thread Dimitar Mavrodiev
Ok, better safe than sorry. Here's the webrev https://googledrive.com/host/0B2CI6Ih--1t5bVVwbVlBRmpVMDg/3/index.html. Best, Dimitar On Mon, Jan 6, 2014 at 6:31 PM, Chris Hegarty wrote: > On 06/01/14 16:18, Dimitar Mavrodiev wrote: > >> Yes, I've disabled IPv6 and it came out as successful in th

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

2014-01-06 Thread Chris Hegarty
On 06/01/14 16:18, Dimitar Mavrodiev wrote: Yes, I've disabled IPv6 and it came out as successful in the report. Is it possible that jtreg behaves differently across different OSes? I am using it on Linux and OSX, the bug report mentions Windows. It is possible, but I don't see any special hand

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

2014-01-06 Thread Dimitar Mavrodiev
Yes, I've disabled IPv6 and it came out as successful in the report. Is it possible that jtreg behaves differently across different OSes? I am using it on Linux and OSX, the bug report mentions Windows. On Mon, Jan 6, 2014 at 6:16 PM, Chris Hegarty wrote: > On 06/01/14 16:05, Dimitar Mavrodiev w

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

2014-01-05 Thread Alan Bateman
On 03/01/2014 11:04, Dimitar Mavrodiev wrote: Greetings all, I've fixed this and created a test to cover it, is there a sponsor who could push this through? Here's a link to the webrev https://googledrive.com/host/0B2CI6Ih--1t5bVVwbVlBRmpVMDg/index.html. It's a simple fix that correctly cons

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

2014-01-03 Thread Dimitar Mavrodiev
Greetings all, I've fixed this and created a test to cover it, is there a sponsor who could push this through? Here's a link to the webrev https://googledrive.com/host/0B2CI6Ih--1t5bVVwbVlBRmpVMDg/index.html. It's a simple fix that correctly consumes the bytes from a SOCKS reply which represent a