8235193: JDK-8235193,(dc) Remove JNI overhead from DatagramChannel.send implementation
Alan Bateman
Alan.Bateman at oracle.com
Thu Dec 5 09:06:29 UTC 2019
On 04/12/2019 16:09, Chris Hegarty wrote:
> :
>
> Inet6Address::addressBytes returns a reference to the actual byte
> array that backs the Inet6Address. The method is package-private and
> only shared through a shared-secret, so it should be fine. I don't
> think that addressBytes should clone the address, just calling it out
> so that we're all on the same page and we pay attention to keeping it
> safe, if there is future refactoring in this area.
Right, Inet6Address::addressBytes is needed so that the IPv6 address
bytes can be copied efficiently into the native sockaddr. If someone
were to make it public by accident then there would be a significant
security issue so any refactoring in this area does need to be careful.
-Alan
More information about the nio-dev
mailing list