Ivan Gerasimov | 21 Sep 14:19 2014
Picon

RFR 8058824: Drop TwoStacks socket implementation in jdk9 [win] - Part I

Hello!

Here is a proposal for the first step in cleaning up the TwoStacks 
socket implementation.
It is proposed to drom IPv6 support in the implementation of 
TwoStacksPlainSocketImpl class (so formally, it's no more Two Stacks).
Therefore, this class will only be used when the user explicitly 
requests IPv4 only configuration through setting 
java.net.preferIPv4Stack option.

The fix mostly consists of removal, so it should be relatively easy to 
review.

All the jdk_net tests pass.

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8058824
WEBREV: http://cr.openjdk.java.net/~igerasim/8058824/0/webrev/

Sincerely yours,
Ivan

Chris Hegarty | 11 Sep 15:42 2014
Picon

RFR [9] 8058216: NetworkInterface.getHardwareAddress can return zero length byte array when run with preferIPv4Stack

A small issue was found when running JCK tests on modern Windows platforms, that have IPv6 enabled, but
forced to run with the IPv4 Stack, -Djava.net.preferIPv4Stack=true.
NetworkInterface.getHardwareAddress() can return a zero length byte array, where is should, and is
specified to, return null.

The solution is to only create the byte array if the physical address is known. Running an existing
regression test with -Djava.net.preferIPv4Stack=true covers this issue.

diff -r 5cf954b229fe src/java.base/windows/native/libnet/NetworkInterface.c
--- a/src/java.base/windows/native/libnet/NetworkInterface.c    Thu Sep 11 15:13:37 2014 +0400
+++ b/src/java.base/windows/native/libnet/NetworkInterface.c    Thu Sep 11 14:34:11 2014 +0100
 <at>  <at>  -990,9 +990,11  <at>  <at> 
       case MIB_IF_TYPE_FDDI:
       case IF_TYPE_IEEE80211:
         len = ifRowP->dwPhysAddrLen;
-        ret = (*env)->NewByteArray(env, len);
-        if (!IS_NULL(ret)) {
-          (*env)->SetByteArrayRegion(env, ret, 0, len, (jbyte *) ifRowP->bPhysAddr);
+        if (len > 0) {
+          ret = (*env)->NewByteArray(env, len);
+          if (!IS_NULL(ret)) {
+            (*env)->SetByteArrayRegion(env, ret, 0, len, (jbyte *) ifRowP->bPhysAddr);
+          }
         }
         break;
       }
diff -r 5cf954b229fe test/java/net/NetworkInterface/Test.java
--- a/test/java/net/NetworkInterface/Test.java  Thu Sep 11 15:13:37 2014 +0400
+++ b/test/java/net/NetworkInterface/Test.java  Thu Sep 11 14:34:11 2014 +0100
 <at>  <at>  -23,6 +23,8  <at>  <at> 
(Continue reading)

Ivan Gerasimov | 9 Sep 13:03 2014
Picon

RFR [7010989]: Duplicate closure of file descriptors leads to unexpected and incorrect closure of sockets

Hello!

In the implementation of TwoStack sockets on Windows there's is a 
possibility of trying to close the sockets twice in the case of a failure.
TwoStack implementation isn't the default one, but it still can be used 
with jdk7u/8u on old platforms.

Would you please help review the fix?

BUGURL: https://bugs.openjdk.java.net/browse/JDK-7010989
WEBREV: http://cr.openjdk.java.net/~igerasim/7010989/0/webrev/

Sincerely yours,
Ivan

Michael McMahon | 26 Aug 16:01 2014
Picon

RFR 8056065: sun/net/www/protocol/http/RedirectOnPost.java failing.

Could I get the following small change reviewed please?

One file was missed from my earlier change to SimpleSSLContext

http://cr.openjdk.java.net/~michaelm/8056065/webrev.1/

Thanks,
Michael.

Seán Coffey | 22 Aug 17:24 2014
Picon

RFR : 8032808, 8047186, 8029607, 8048212 - SO_FLOW_SLA support for solaris, Set TOS in IPv6 header

I'd like to backport these fixes into the jdk7u-dev codeline. They're already in jdk8u-dev.

https://bugs.openjdk.java.net/browse/JDK-8032808 - SO_FLOW_SLA support for solaris
https://bugs.openjdk.java.net/browse/JDK-8047186 - Exception handling change linked to above

https://bugs.openjdk.java.net/browse/JDK-8029607 - Set TOS in IPv6 header
https://bugs.openjdk.java.net/browse/JDK-8048212 - Testcase failure with above fix

some of the changes are quite different from jdk8u in that the make system is different. I've put some of the main differences in bullet points :

* new makefiles to capture the jdk/net classes
* Different javadoc makefile layout for 7u
* static src/share/native/java/net/jdk_net_SocketFlow.h header file (dynamic in jdk8u)
* Alter src/share/classes/jdk/net/Sockets.java :
  - throw new Error(e); instead of throw new InternalError(e); (older API)
* removal of lambda use in testcase

webrev : http://cr.openjdk.java.net/~coffeys/webrev.sla_tos/webrev/
CCC for 7u has been submitted.

Regards,
Sean.

Mark Sheppard | 21 Aug 18:02 2014
Picon

RFR: JDK-8044306 - java.net.Inet4AddressImpl.getLocalHostName() uses IPv6 rather than IPv4

Hi
   please oblige and review the small change
http://cr.openjdk.java.net/~msheppar/8044306/webrev/

to address the issue raised in
https://bugs.openjdk.java.net/browse/JDK-8044306

hints.ai_family is assigned AF_INET rather than AF_UNSPEC
as the native function
Java_java_net_Inet4AddressImpl_getLocalHostName
is part of an IPv4 call flow, such that AF_UNSPEC allows
an IPv6 data to be retrieved as highlighted in bug report

regards
Mark

Michael McMahon | 21 Aug 13:33 2014
Picon

RFR 8055747: Move SimpleSSLContext to jdk/testlibrary

Before I push the other change to HttpsURLConnection, I'd like
to make this change to stop the proliferation of binary testkeys files
in the test tree and make the SimpleSSLContext class more accessible.

http://cr.openjdk.java.net/~michaelm/8055747/webrev.01/

Thanks,
Michael

Michael McMahon | 20 Aug 15:02 2014
Picon

RFR: 8055299 HttpsURLConnection.equals() broken

This is the recently reported fix to HttpsURLConnection.equals

http://cr.openjdk.java.net/~michaelm/8055299/webrev.1/

The fix includes a test. Not shown in the webrev is java key store
file called testkeys, which is copied from another location
in the test tree and is to be installed in the same directory
as the new test.

Thanks
Michael

Claes Redestad | 13 Aug 16:02 2014
Picon

RFR(S): 8055032: Improve numerical parsing in java.net and sun.net

Hi,

can I have a review for this patch to take advantage of offset-based 
parseInt methods added in
8041972 for java.net/sun.net classes?

bug: https://bugs.openjdk.java.net/browse/JDK-8055032
webrev: http://cr.openjdk.java.net/~redestad/8055032/webrev.0

This causes fewer temporary String objects to be allocated and shows a 
direct throughput improvement
in micros (1.2x in java.net.URLDecoder#decode and 
sun.net.www.ParseUtil#decode, for example)

/Claes

Mark Sheppard | 7 Aug 20:15 2014
Picon

RFR: JDK-8054118 - java/net/ipv6tests/UdpTest.java failed intermittently

Hi,
   please oblige and review the following fix
http://cr.openjdk.java.net/~msheppar/8054118/webrev/

to address the issue raised in
https://bugs.openjdk.java.net/browse/JDK-8054118

The Windows test environment has a Teredo interface.
This oscillates between being configured with IPv6 and not been configured.
The configured state is transient. When configured its IPv6 is retrieved as
first local ipv6 address. As such, it can happen that during the test the
interface is disabled, and the test will fail with the report Socket 
receive timeout.

This fix removes the Teredo interface from the testing scenario, so that 
a more stable interface
will be used.

regards
Mark

Wang Weijun | 1 Aug 07:39 2014
Picon

nameservers in solaris/.../ResolverConfigurationImpl not static

There are 2 sun.net.dns.ResolverConfigurationImpl implementations. The cached searchlist and
nameservers in the solaris version are instance fields and those in windows are static. The cache
mechanism in both is guarded by static fields changed and lastRefresh. Therefore it seems the solaris
searchlist/nameservers should also be static.

--Max


Gmane