Revert "Merge branch 'topic/jgras/iosource-offline-fd' of https://github.com/J-Gras/zeek"

This reverts commit 957825441a, reversing
changes made to c8cdc75f2b.

Caused spurious CI failures in the external testing baselines. See zeek/zeek#2842.
This commit is contained in:
Arne Welzel 2023-03-08 12:07:45 +01:00
parent 957825441a
commit b58a2d3822
5 changed files with 23 additions and 13 deletions

View file

@ -182,11 +182,10 @@ void PcapSource::OpenOffline()
return;
}
// We don't register the file descriptor if we're in offline mode,
// because libpcap's file descriptor for trace files isn't a reliable
// way to know whether we actually have data to read.
// See https://github.com/the-tcpdump-group/libpcap/issues/870
props.selectable_fd = -1;
props.selectable_fd = fileno(pcap_file(pd));
if ( props.selectable_fd < 0 )
InternalError("OS does not support selectable pcap fd");
props.link_type = pcap_datalink(pd);
props.is_live = false;