RFR(XS): 8217311: Improve Exception thrown when MulticastSocket.setInterface fails on AIX(Unix)

Langer, Christoph christoph.langer at sap.com
Thu Jan 17 11:03:34 UTC 2019


Thanks Alan and Steve for the reviews.

From: net-dev <net-dev-bounces at openjdk.java.net> On Behalf Of Alan Bateman
Sent: Donnerstag, 17. Januar 2019 11:45
To: net-dev at openjdk.java.net
Subject: Re: RFR(XS): 8217311: Improve Exception thrown when MulticastSocket.setInterface fails on AIX(Unix)

Looks okay to me too.  I think we should encourage new multicast applications to move to DatagramChannel as it a defines factory methods to specify the protocol family at creation time. Also setOption(IP_MULTICAST_IF, ...) and the join methods are also specified for such cases. Going forward I also need we need to replace PlainDatagramSocketImpl but that's a topic for another thread.

-Alan
On 17/01/2019 10:18, Steve Groeger wrote:
Hi Chris,

Looks OK to me.

That is one of the changes I had made locally while investigating  https://bugs.openjdk.java.net/browse/JDK-8207404, so happy to accept it.

Thanks
Steve Groeger
IBM Runtime Technologies
Hursley, Winchester
Tel: (44) 1962 816911  Mobex: 279990  Mobile: 07718 517 129
Fax (44) 1962 816800
Lotus Notes: Steve Groeger/UK/IBM
Internet: groeges at uk.ibm.com<mailto:groeges at uk.ibm.com>

Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU



From:        "Langer, Christoph" <christoph.langer at sap.com><mailto:christoph.langer at sap.com>
To:        "net-dev at openjdk.java.net"<mailto:net-dev at openjdk.java.net> <net-dev at openjdk.java.net><mailto:net-dev at openjdk.java.net>
Date:        17/01/2019 09:55
Subject:        RFR(XS): 8217311: Improve Exception thrown when MulticastSocket.setInterface fails on AIX(Unix)
Sent by:        "net-dev" <net-dev-bounces at openjdk.java.net><mailto:net-dev-bounces at openjdk.java.net>
________________________________



Hi,

please help to review a tiny fix.

While working on the issue with the AIX multicast tests (https://bugs.openjdk.java.net/browse/JDK-8207404), I found a place where a SocketException thrown in a specific error case could be improved. There already exists code to throw a SocketException with the text "IPV6_MULTICAST_IF failed (interface has IPv4 address only?) " when setsockopt(IPV6_MULTICAST_IF) fails with EINVAL. On AIX, when you have IPv4 addresses only on an interface, you’ll run into when setting the option on an AF_INET6 socket. So that specific SocketException text would match very well then. I guess the addition is fine to be platform independent. At best on other platforms EADDRNOTAVAIL is never seen at that place. Or if it was, it would certainly have to do with an IP address problem on the interface...

Webrev: http://cr.openjdk.java.net/~clanger/webrevs/8217311.0/
Bug: https://bugs.openjdk.java.net/browse/JDK-8217311

Thanks and best regards
Christoph



Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/net-dev/attachments/20190117/20b210d1/attachment-0001.html>


More information about the net-dev mailing list