Possible fix for NMAP problem causing soft-reboot

Added by David Svensson over 3 years ago

There is a problem in AGA that occurs when you use NMAP as an unprivileged user. This causes the AGA-tablet to make a soft-reboot.

The problem causing this is in a function called sendGreeting in the AbstractEthGatewayNode.java.
After NMAP has scanned the port it closes the connection, however sendGreeting excpects the connection to still be up. This causes sendGreeting to throw an exception which it passes up to the function that called sendGreeting.  Since these fuctions does not expect this exception it causes the soft-reboot. 
A possible fix for this is to add throws IOException to sendGreeting:

protected void sendGreeting(final SocketChannel socketChannel) throws IOException {

and then handle the exception in a try catch in the function above like this:

}catch (IOException re) {
LOGGER.error("connection reset by peer"); //return;

Hope it helps!


Replies (1)

RE: Possible fix for NMAP problem causing soft-reboot - Added by Christopher Pavlic over 3 years ago

Thanks for pointing this ut for us. We have looked at the code and your code and started to make a patch for the problem.

I will make a post when it is ready.