p0f: added path to socket in error message

if p0f cannot connect, provide a more descriptive error message. Particularly useful for a p0f plugin developer that runs both p0f v2 and v3 at the same time.
This commit is contained in:
Matt Simerson 2013-03-11 00:14:38 -04:00
parent c3dff626cb
commit 0ed418fafd

View File

@ -256,7 +256,7 @@ sub query_p0f_v2 {
socket(SOCK, PF_UNIX, SOCK_STREAM, 0)
or $self->log(LOGERROR, "socket: $!"), return;
connect(SOCK, sockaddr_un($p0f_socket))
or $self->log(LOGERROR, "connect: $!"), return;
or $self->log(LOGERROR, "connect: $! ($p0f_socket)"), return;
defined syswrite SOCK, $query
or $self->log(LOGERROR, "write: $!"), close SOCK, return;