Do not log errors form pcap_dispatch() caused by signals.
authorclaudio <claudio@openbsd.org>
Fri, 17 Nov 2023 12:10:23 +0000 (12:10 +0000)
committerclaudio <claudio@openbsd.org>
Fri, 17 Nov 2023 12:10:23 +0000 (12:10 +0000)
commite75e148f81511fc8f6c2989297fd5c942483fb7a
treed7150414a117efe261f7eb4a0fe1c8fb9e3872c0
parent89729f590517fbb6e08bcdc72378bd9c85366a56
Do not log errors form pcap_dispatch() caused by signals.

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@
sbin/pflogd/pflogd.c