JDK-8187658 : Bigger buffer for GetAdaptersAddresses
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • Submitted: 2017-09-19
  • Updated: 2018-05-14
  • Resolved: 2017-10-04
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 6 JDK 7 JDK 8
10 b26Fixed 6u191Fixed 7u181Fixed 8u172Fixed
Related Reports
Relates :  
MSDN recommends [1] to use 15K buffer when invoking GetAdaptersAddresses().
It also suggests (in the example code) to do a few retries in a case of a failure due to insufficient buffer size).

We have reports that the number of the network adaptors can change at the early stage of the OS boot cycle, so if a Java application is running at that time it can experience a trouble because of too small buffer.

It seems to be a correct approach to follow the recommendations from MSDN in this case.

[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa365915(v=vs.85).aspx