mirror of
https://github.com/nmap/nmap.git
synced 2026-08-28 04:25:15 +00:00
Use get_localaddr_string in the connect bind log message.
This includes the port number, not just the address.
This commit is contained in:
parent
21077a93e1
commit
67bc0819b4
1 changed files with 2 additions and 11 deletions
|
|
@ -95,17 +95,8 @@ static int nsock_make_socket(mspool *ms, msiod *iod, int family, int type, int p
|
|||
|
||||
rc = bind(iod->sd, (struct sockaddr *)&iod->local, (int) iod->locallen);
|
||||
if (rc == -1) {
|
||||
const char *addrstr = NULL;
|
||||
|
||||
#if HAVE_SYS_UN_H
|
||||
if (iod->local.ss_family == AF_UNIX)
|
||||
addrstr = get_unixsock_path(&iod->local);
|
||||
else
|
||||
#endif
|
||||
addrstr = inet_ntop_ez(&iod->local, iod->locallen);
|
||||
|
||||
nsock_log_error(ms, "Bind to %s failed (IOD #%li): %s", addrstr, iod->id,
|
||||
strerror(errno));
|
||||
nsock_log_error(ms, "Bind to %s failed (IOD #%li): %s",
|
||||
get_localaddr_string(iod), iod->id, strerror(errno));
|
||||
}
|
||||
}
|
||||
if (iod->ipoptslen && family == AF_INET) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue