[ipv6] RFR: 8223532: Don't try creating IPv4 sockets in NetworkInterface.c if IPv4 is not supported

Arthur Eubanks aeubanks at google.com
Thu May 9 20:05:21 UTC 2019


*From: *Chris Hegarty <chris.hegarty at oracle.com>
*Date: *Thu, May 9, 2019 at 9:24 AM
*To: *Arthur Eubanks
*Cc: *OpenJDK Network Dev list

Arthur,
>
> > On 8 May 2019, at 18:33, Arthur Eubanks <aeubanks at google.com> wrote:
> >
> > Reverted changes in net_util.c.
> > Also, webrev.00 would create an IPv6 socket even if creating the IPv4
> socket was successful. Fixed. (My very first revision had this same issue,
> which I thought I had fixed before sending it out. Tricky if statements
> have been cleaned up to make this less likely to happen again in the
> future.)
> >
> > http://cr.openjdk.java.net/~aeubanks/8223532/webrev.01/
>
> The following is Solaris specific code:
>
> 1630                 sock = socket(AF_INET6, SOCK_DGRAM, 0)
>
> It is missing a trailing semi-colon, so does not compile on Solaris.
>
> Also the else block where this code exists should probably be:
>
>    else if (ipv6_available()) {
>
>    , since it creates an AF_NET6 socket.
>
Fixed

>
> I’ll run some tests.
>
Thanks

>
> -Chris.


New webrev:
 http://cr.openjdk.java.net/~aeubanks/8223532/webrev.02/index.html
This also contains some changes from Mark's suggestions. That thread
appears to have been separated from this thread in my inbox for some reason.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20190509/170d841b/attachment-0001.html>


More information about the net-dev mailing list