pcap_dispatch() returns -1 (PCAP_ERROR) or -2 (PCAP_ERROR_BREAK) the
latter is used when a signal is received and is not an error. So limit
the code to log errors to np == -1.
OK semarie@ sashan@
-/* $OpenBSD: pflogd.c,v 1.65 2023/11/12 15:18:04 dlg Exp $ */
+/* $OpenBSD: pflogd.c,v 1.66 2023/11/17 12:10:23 claudio Exp $ */
/*
* Copyright (c) 2001 Theo de Raadt
while (1) {
np = pcap_dispatch(hpcap, PCAP_NUM_PKTS,
phandler, (u_char *)dpcap);
- if (np < 0) {
+ if (np == -1) {
if (!if_exists(interface)) {
logmsg(LOG_NOTICE, "interface %s went away",
interface);