mirror of
https://github.com/nmap/nmap.git
synced 2026-01-08 07:29:03 +00:00
@@ -1,5 +1,10 @@
|
||||
# Nmap Changelog ($Id$); -*-text-*-
|
||||
|
||||
o [Ncat] [GH#193] Fix Ncat listen mode over Unix sockets (named pipes) on OS X.
|
||||
This was crashing with the error:
|
||||
Ncat: getnameinfo failed: Undefined error: 0 QUITTING.
|
||||
Fixed by forcing the name to "localhost" [Michael Wallner]
|
||||
|
||||
o [NSE] Added knx-gateway-discover and knx-gateway-info scripts for gathering
|
||||
information from multicast and unicast KNX gateways, which connect home
|
||||
automation systems to IP networks. [Niklaus Schiess, Dominik Schneider]
|
||||
|
||||
@@ -569,6 +569,13 @@ void setup_environment(struct fdinfo *info)
|
||||
if (getpeername(info->fd, &su.sockaddr, &alen) != 0) {
|
||||
bye("getpeername failed: %s", socket_strerror(socket_errno()));
|
||||
}
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
if (su.sockaddr.sa_family == AF_UNIX) {
|
||||
/* say localhost to keep it backwards compatible */
|
||||
setenv_portable("NCAT_REMOTE_ADDR", "localhost");
|
||||
setenv_portable("NCAT_REMOTE_PORT", "");
|
||||
} else
|
||||
#endif
|
||||
if (getnameinfo((struct sockaddr *)&su, alen, ip, sizeof(ip),
|
||||
port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) == 0) {
|
||||
setenv_portable("NCAT_REMOTE_ADDR", ip);
|
||||
@@ -580,6 +587,13 @@ void setup_environment(struct fdinfo *info)
|
||||
if (getsockname(info->fd, (struct sockaddr *)&su, &alen) < 0) {
|
||||
bye("getsockname failed: %s", socket_strerror(socket_errno()));
|
||||
}
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
if (su.sockaddr.sa_family == AF_UNIX) {
|
||||
/* say localhost to keep it backwards compatible, else su.un.sun_path */
|
||||
setenv_portable("NCAT_LOCAL_ADDR", "localhost");
|
||||
setenv_portable("NCAT_LOCAL_PORT", "");
|
||||
} else
|
||||
#endif
|
||||
if (getnameinfo((struct sockaddr *)&su, alen, ip, sizeof(ip),
|
||||
port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) == 0) {
|
||||
setenv_portable("NCAT_LOCAL_ADDR", ip);
|
||||
|
||||
Reference in New Issue
Block a user