FreeBSD now supports BIOCLOCK. So we can use it now.
Reviewed by: mlaier
This commit is contained in:
parent
fdb9eda84f
commit
5f305d1bf2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149380
@ -216,15 +216,11 @@ init_pcap(void)
|
||||
|
||||
cur_snaplen = snaplen = pcap_snapshot(hpcap);
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
/* We can not lock bpf devices ... yet */
|
||||
#else
|
||||
/* lock */
|
||||
if (ioctl(pcap_fileno(hpcap), BIOCLOCK) < 0) {
|
||||
logmsg(LOG_ERR, "BIOCLOCK: %s", strerror(errno));
|
||||
return (-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user