mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Make pflogd cope with module unload (and the sudden disappearing of pflog0).
Instead of eating all the available CPU we now shutdown gracefully. Submitted by: yongari MFC after: 3 days
This commit is contained in:
parent
90d186c0cb
commit
22d6889b4d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=136141
@ -656,8 +656,16 @@ main(int argc, char **argv)
|
||||
while (1) {
|
||||
np = pcap_dispatch(hpcap, PCAP_NUM_PKTS,
|
||||
dump_packet, (u_char *)dpcap);
|
||||
if (np < 0)
|
||||
if (np < 0) {
|
||||
#ifdef __FreeBSD__
|
||||
if (errno == ENXIO) {
|
||||
logmsg(LOG_ERR,
|
||||
"Device not/no longer configured");
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
logmsg(LOG_NOTICE, "%s", pcap_geterr(hpcap));
|
||||
}
|
||||
|
||||
if (gotsig_close)
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user