diff --git a/CHANGELOG b/CHANGELOG index 996588c05..bcffec4c2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,7 @@ # Nmap Changelog ($Id$); -*-text-*- +o Linux unreachable routes are now properly ignored. [David Fifield] + o [NSE] Added smb-vuln-ms10-054 script which check the target system for MS10-054 vulnerability in SMB. [Aleksandar] diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index 977064b11..1f74752cc 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -3093,6 +3093,10 @@ static int route_dst_netlink(const struct sockaddr_storage *dst, netutil_fatal("%s: wrong size reply in recvmsg", __func__); len -= NLMSG_LENGTH(sizeof(*nlmsg)); + /* See rtnetlink(7). Anything matching this route is actually unroutable. */ + if (rtmsg->rtm_type == RTN_UNREACHABLE) + return 0; + /* Default values to be possibly overridden. */ rnfo->direct_connect = 1; rnfo->nexthop.ss_family = AF_UNSPEC;