Although I've only just sent in the pdf form for an ora, I've already submitted a pull request, https://github.com/openjdk/jdk/pull/1502 wherein an attempt is first made to use an IPPROTO_ICMP socket before falling back on RAW_SOCK and finally tcp echo.
I suppose now I have to wait until I am able to open an issue in the bug tracker so I can associate the pull request to it. Does anyone know what a unit test for this might look like? To cover the use cases the code has to be invoked by both a privileged and unprivileged user, and I'm not sure how to go about setting up a unit test. On Sun, 29 Nov 2020 at 02:37, Alan Bateman <alan.bate...@oracle.com> wrote: > On 28/11/2020 02:42, Jamie Le Tual wrote: > > : > > It all seems to check out (at least on my machine,) the icmp packets look > good in wireshark, so the first thing I'm wondering is what the catch must > be, because this seems like a simple solution and I'm wondering why it was > never done like this. > > The isReachable methods were added in Java 5 so they pre-date the kernel > support for non-privileged ICMP. It seems a good idea to explore this now > and work through any implications for using it. > > -Alan. >