RFR(XS): 8217311: Improve Exception thrown when MulticastSocket.setInterface fails on AIX(Unix)
Baesken, Matthias
matthias.baesken at sap.com
Thu Jan 17 11:04:40 UTC 2019
Hi Christoph, I do not even see EADDRNOTAVAIL listed in the list of error codes of setsockopt on AIX 7.1 (manpage).
Strange that it shows up (maybe the manpage is incomplete ?).
But otherwise it looks good to me (not a Reviewer).
Maybe one could mention the error (or errno) in the exception for all cases of setsockopt failing ?
Best regards, Matthias
> Message: 4
> Date: Thu, 17 Jan 2019 09:54:28 +0000
> From: "Langer, Christoph" <christoph.langer at sap.com>
> To: "net-dev at openjdk.java.net" <net-dev at openjdk.java.net>
> Subject: RFR(XS): 8217311: Improve Exception thrown when
> MulticastSocket.setInterface fails on AIX(Unix)
> Message-ID: <776f4e2e575d4fab85aed53ab40af1b1 at sap.com>
> Content-Type: text/plain; charset="us-ascii"
>
> 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
>
More information about the net-dev
mailing list