diff --git a/ncat/ncat_listen.c b/ncat/ncat_listen.c index 304bd06c2..dbb25e5b8 100644 --- a/ncat/ncat_listen.c +++ b/ncat/ncat_listen.c @@ -878,8 +878,14 @@ static int ncat_listen_dgram(int proto) ncat_log_recv(buf, nbytes); } - if (o.verbose) + if (o.verbose) { +#if HAVE_SYS_UN_H + if (remotess.sockaddr.sa_family == AF_UNIX) + loguser("Connection from %s.\n", remotess.un.sun_path); + else +#endif loguser("Connection from %s.\n", inet_socktop(&remotess)); + } conn_inc++;