mirror of
https://github.com/nmap/nmap.git
synced 2026-10-20 19:01:56 +00:00
Add debug info with getaddrinfo error
This commit is contained in:
parent
f4b7c6f09d
commit
358d221aa3
1 changed files with 4 additions and 1 deletions
5
tcpip.cc
5
tcpip.cc
|
|
@ -484,8 +484,11 @@ struct addrinfo *resolve_all(const char *hostname, int pf) {
|
|||
/* Otherwise we get multiple identical addresses with different socktypes. */
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
rc = getaddrinfo(hostname, NULL, &hints, &result);
|
||||
if (rc != 0)
|
||||
if (rc != 0){
|
||||
if (o.debugging > 1)
|
||||
error("Error resolving %s: %s", hostname, gai_strerror(rc));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue