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

Get better error message. See #2179

This commit is contained in:
dmiller
2022-09-28 21:40:57 +00:00
parent fc7513cae6
commit de9f84d080

View File

@@ -3194,7 +3194,8 @@ static int route_dst_netlink(const struct sockaddr_storage *dst,
intf_index = *(int *) RTA_DATA(rtattr);
p = if_indextoname(intf_index, namebuf);
assert(p != NULL);
if (p == NULL)
netutil_fatal("%s: if_indextoname(%d) failed: %d (%s)", __func__, intf_index, errno, strerror(errno));
ii = getInterfaceByName(namebuf, dst->ss_family);
if (ii == NULL)
ii = getInterfaceByName(namebuf, AF_UNSPEC);