Merge pull request #183 from flimzy/p0f-errors-redo
Fix error checking for socket connections
This commit is contained in:
commit
25f29dbbf6
@ -323,12 +323,9 @@ sub query_p0f_v3 {
|
|||||||
my $query = $self->get_v3_query() or return;
|
my $query = $self->get_v3_query() or return;
|
||||||
|
|
||||||
# Open the connection to p0f
|
# Open the connection to p0f
|
||||||
my $sock;
|
my $sock = IO::Socket::UNIX->new(Peer => $p0f_socket, Type => SOCK_STREAM);
|
||||||
eval {
|
|
||||||
$sock = IO::Socket::UNIX->new(Peer => $p0f_socket, Type => SOCK_STREAM);
|
|
||||||
};
|
|
||||||
if (!$sock) {
|
if (!$sock) {
|
||||||
$self->log(LOGERROR, "skip, could not open socket: $@");
|
$self->log(LOGERROR, "skip, could not open socket: $!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user