1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-14 19:59:02 +00:00

Reject non-useable routes. Fixes #2206

This commit is contained in:
nnposter
2021-01-18 20:11:40 +00:00
parent 5258ac6b3c
commit 4564749ccd
2 changed files with 6 additions and 1 deletions

View File

@@ -3163,7 +3163,8 @@ static int route_dst_netlink(const struct sockaddr_storage *dst,
len -= NLMSG_LENGTH(sizeof(*nlmsg));
/* See rtnetlink(7). Anything matching this route is actually unroutable. */
if (rtmsg->rtm_type == RTN_UNREACHABLE)
if (rtmsg->rtm_type == RTN_UNREACHABLE || rtmsg->rtm_type == RTN_UNSPEC
|| rtmsg->rtm_type == RTN_BLACKHOLE || rtmsg->rtm_type == RTN_PROHIBIT)
return 0;
/* Default values to be possibly overridden. */