Closed infrastation closed 1 year ago
Only checking the first few characters. The above will find that string "1.11" is greater than "0.7.2", and therefore it works.
I'll grant you that the test could be updated to test first character is > "0" to make this easier to read.
Fixed in PR #764 for version 4.4.3
Thank you for looking into this. Please note that the first three characters of the string libpcap version 1.11.0-PRE-GIT (with TPACKET_V3)
are lib
, not 1.11
or 1.1
.
Did more testing, and your comment is correct. Reopening.
Better detection of libpcap version detection in PR #766 including detecting the correct copy of libpcap.
Thank you!
The file
configure.ac
includes three test programs for libpcap, each of which includes at least one test of the following form:Please note that in modern versions of libpcap the value returned from
pcap_lib_version()
is not just the version, but a loosely formatted string that depends on the underlying module, such aslibpcap version 1.11.0-PRE-GIT (with TPACKET_V3)
, so the test needs to be different to work correctly for all cases (I do not have an immediate idea what in particular would work best).