Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/libpcap/dist Sunday, July 22, 2018
details: https://anonhg.NetBSD.org/src/rev/76e1d2ae13c1
branches: trunk
changeset: 965766:76e1d2ae13c1
user: christos <christos%NetBSD.org@localhost>
date: Tue Oct 01 16:00:25 2019 +0000
description:
Sunday, July 22, 2018
Summary for 1.9.1 libpcap release
Mention pcap_get_required_select_timeout() in the main pcap man page
Fix pcap-usb-linux.c build on systems with musl
Fix assorted man page and other documentation issues
Plug assorted memory leaks
Documentation changes to use https:
Changes to how time stamp calculations are done
Lots of tweaks to make newer compilers happier and warning-free and
to fix instances of C undefined behavior
Warn if AC_PROG_CC_C99 can't enable C99 support
Rename pcap_set_protocol() to pcap_set_protocol_linux().
Align pcap_t private data on an 8-byte boundary.
Fix various error messages
Use 64-bit clean API in dag_findalldevs()
Fix cleaning up after some errors
Work around some ethtool ioctl bugs in newer Linux kernels (GitHub
issue #689)
Add backwards compatibility sections to some man pages (GitHub issue
#745)
Fix autotool configuration on AIX and macOS
Don't export bpf_filter_with_aux_data() or struct bpf_aux_data;
they're internal-only and subject to change
Fix pcapng block size checking
On macOS, don't build rpcapd or test programs any fatter than they
need to be
Fix reading of capture statistics for Linux USB
Fix packet size values for Linux USB packets (GitHub issue #808)
Check only VID in VLAN test in filterss (GitHub issue #461)
Fix pcap_list_datalinks on 802.11 devices on macOS
Fix overflows with very large snapshot length in pcap file
Improve parsing of rpcapd configuration file (GitHub issue #767)
Handle systems without strlcpy() or strlcat() better
Fix crashes and other errors with invalid filter expressions
Fix use of uninitialized file descriptor in remote capture
Fix some CMake issues
Fix some divide-by-zero issues with the filter compiler
Work around a GNU libc bug in pcap_nametonetaddr()
Add support for DLT_LINUX_SLL2
Fix handling of the packet-count argument for Myricom SNF devices
Fix --disable-rdma in configure script (GitHub issue #782)
Fix compilation of TurboCap support (GitHub issue #764)
Constify first argument to pcap_findalldevs_ex()
Fix a number of issues when running rpcapd as an inetd-style daemon
Fix CMake issues with D-Bus libraries
In rpcapd, clean up termination of a capture session
Redo remote capture protocol negotiation
In rpcapd, report the same error for "invalid user name" and
"invalid password", to make brute-forcing harder
For remote captures, add an error code for "the server requires TLS"
Fix pcap_dump_fopen() on Windows to avoid clashes between
{Win,N}Pcap and application C runtimes
Fix exporting of functions from Windows DLLs (GitHub issue #810)
Fix building as part of Npcap
Allow rpcapd to rebind more rapidly
Fix building shared libpcap library on midipix (midipix.org)
Fix hack to detect UTF-16LE adapter names on Windows not to go past
the end of the string
Fix handling of "wireless WAN" (mobile phone network modems) on
Windows with WinPcap/Npcap (GitHub issue #824)
Have pcap_dump_open_append() create the dump file if it doesn't
exists (GitHub issue #247)
Fix the maxmum snapshot length for DLT_USBPCAP
Use -fPIC when building for 64-bit SPARC on Linux (GitHub issue #837)
Fix CMake 64-bit library installation directory on some Linux
distributions
Boost the TPACKET_V3 timeout to the maximum if a timeout of 0 was
specified
Five CVE-2019-15161, CVE-2019-15162, CVE-2019-15163, CVE-2019-15164, CVE-2019-15165
Fixes for CVE-2018-16301, errors in pcapng reading.
PCAPNG reader applies some sanity checks before doing malloc().
diffstat:
external/bsd/libpcap/dist/CHANGES | 72 +
external/bsd/libpcap/dist/CMakeLists.txt | 368 ++-
external/bsd/libpcap/dist/CREDITS | 2 +-
external/bsd/libpcap/dist/INSTALL.md | 5 +-
external/bsd/libpcap/dist/Makefile.in | 26 +-
external/bsd/libpcap/dist/VERSION | 2 +-
external/bsd/libpcap/dist/aclocal.m4 | 23 +-
external/bsd/libpcap/dist/cmake/Modules/FindPacket.cmake | 13 +-
external/bsd/libpcap/dist/cmakeconfig.h.in | 23 +-
external/bsd/libpcap/dist/config.h.in | 18 +-
external/bsd/libpcap/dist/configure | 1279 ++++++---
external/bsd/libpcap/dist/configure.ac | 283 +-
external/bsd/libpcap/dist/doc/README.Win32.md | 3 +
external/bsd/libpcap/dist/doc/README.dag | 4 +-
external/bsd/libpcap/dist/doc/README.linux.md | 4 +-
external/bsd/libpcap/dist/fmtutils.c | 99 +-
external/bsd/libpcap/dist/fmtutils.h | 5 +
external/bsd/libpcap/dist/ftmacros.h | 18 +-
external/bsd/libpcap/dist/missing/asprintf.c | 101 +
external/bsd/libpcap/dist/missing/snprintf.c | 12 +-
external/bsd/libpcap/dist/missing/strlcat.c | 61 +
external/bsd/libpcap/dist/missing/strlcpy.c | 56 +
external/bsd/libpcap/dist/missing/win_asprintf.c | 51 +
external/bsd/libpcap/dist/missing/win_snprintf.c | 12 +
external/bsd/libpcap/dist/pcap-filter.manmisc.in | 26 +-
external/bsd/libpcap/dist/pcap-linktype.manmisc.in | 2 +-
external/bsd/libpcap/dist/pcap-netmap.c | 2 +-
external/bsd/libpcap/dist/pcap-new.c | 85 +-
external/bsd/libpcap/dist/pcap-npf.c | 236 +-
external/bsd/libpcap/dist/pcap-rpcap.c | 628 ++--
external/bsd/libpcap/dist/pcap-rpcap.h | 4 +-
external/bsd/libpcap/dist/pcap-savefile.manfile.in | 2 +-
external/bsd/libpcap/dist/pcap-sita.html | 2 +-
external/bsd/libpcap/dist/pcap-tc.c | 23 +-
external/bsd/libpcap/dist/pcap-tstamp.manmisc.in | 19 +-
external/bsd/libpcap/dist/pcap/compiler-tests.h | 2 +-
external/bsd/libpcap/dist/pcap/dlt.h | 61 +-
external/bsd/libpcap/dist/pcap/funcattrs.h | 14 +-
external/bsd/libpcap/dist/pcap/pcap-inttypes.h | 11 +
external/bsd/libpcap/dist/pcap/socket.h | 93 +
external/bsd/libpcap/dist/pcap_compile.3pcap.in | 23 +-
external/bsd/libpcap/dist/pcap_datalink.3pcap.in | 4 +-
external/bsd/libpcap/dist/pcap_get_required_select_timeout.3pcap | 36 +-
external/bsd/libpcap/dist/pcap_get_tstamp_precision.3pcap.in | 4 +
external/bsd/libpcap/dist/pcap_list_datalinks.3pcap.in | 14 +-
external/bsd/libpcap/dist/pcap_list_tstamp_types.3pcap.in | 23 +-
external/bsd/libpcap/dist/pcap_open_dead.3pcap.in | 11 +-
external/bsd/libpcap/dist/pcap_set_immediate_mode.3pcap.in | 95 +
external/bsd/libpcap/dist/pcap_set_protocol_linux.3pcap | 7 +-
external/bsd/libpcap/dist/pcap_set_tstamp_precision.3pcap.in | 13 +-
external/bsd/libpcap/dist/pcap_set_tstamp_type.3pcap.in | 21 +-
external/bsd/libpcap/dist/portability.h | 91 +-
external/bsd/libpcap/dist/rpcap-protocol.h | 157 +-
external/bsd/libpcap/dist/rpcapd/CMakeLists.txt | 47 +-
external/bsd/libpcap/dist/rpcapd/Makefile.in | 19 +-
external/bsd/libpcap/dist/rpcapd/daemon.c | 1151 +++++---
external/bsd/libpcap/dist/rpcapd/daemon.h | 5 +-
external/bsd/libpcap/dist/rpcapd/fileconf.c | 475 +++-
external/bsd/libpcap/dist/rpcapd/log.c | 260 ++
external/bsd/libpcap/dist/rpcapd/log.h | 24 +-
external/bsd/libpcap/dist/rpcapd/rpcapd-config.manfile.in | 78 +
external/bsd/libpcap/dist/rpcapd/rpcapd.c | 286 +-
external/bsd/libpcap/dist/rpcapd/rpcapd.inetd.conf | 1 -
external/bsd/libpcap/dist/rpcapd/rpcapd.manadmin.in | 26 +-
external/bsd/libpcap/dist/rpcapd/win32-svc.c | 29 +-
external/bsd/libpcap/dist/sf-pcapng.c | 145 +-
external/bsd/libpcap/dist/sf-pcapng.h | 2 +-
external/bsd/libpcap/dist/sockutils.c | 328 +-
external/bsd/libpcap/dist/sockutils.h | 76 +-
69 files changed, 4864 insertions(+), 2337 deletions(-)
diffs (truncated from 11617 to 300 lines):
diff -r 55570bbfba42 -r 76e1d2ae13c1 external/bsd/libpcap/dist/CHANGES
--- a/external/bsd/libpcap/dist/CHANGES Tue Oct 01 11:49:12 2019 +0000
+++ b/external/bsd/libpcap/dist/CHANGES Tue Oct 01 16:00:25 2019 +0000
@@ -1,3 +1,75 @@
+Sunday, July 22, 2018
+ Summary for 1.9.1 libpcap release
+ Mention pcap_get_required_select_timeout() in the main pcap man page
+ Fix pcap-usb-linux.c build on systems with musl
+ Fix assorted man page and other documentation issues
+ Plug assorted memory leaks
+ Documentation changes to use https:
+ Changes to how time stamp calculations are done
+ Lots of tweaks to make newer compilers happier and warning-free and
+ to fix instances of C undefined behavior
+ Warn if AC_PROG_CC_C99 can't enable C99 support
+ Rename pcap_set_protocol() to pcap_set_protocol_linux().
+ Align pcap_t private data on an 8-byte boundary.
+ Fix various error messages
+ Use 64-bit clean API in dag_findalldevs()
+ Fix cleaning up after some errors
+ Work around some ethtool ioctl bugs in newer Linux kernels (GitHub
+ issue #689)
+ Add backwards compatibility sections to some man pages (GitHub issue
+ #745)
+ Fix autotool configuration on AIX and macOS
+ Don't export bpf_filter_with_aux_data() or struct bpf_aux_data;
+ they're internal-only and subject to change
+ Fix pcapng block size checking
+ On macOS, don't build rpcapd or test programs any fatter than they
+ need to be
+ Fix reading of capture statistics for Linux USB
+ Fix packet size values for Linux USB packets (GitHub issue #808)
+ Check only VID in VLAN test in filterss (GitHub issue #461)
+ Fix pcap_list_datalinks on 802.11 devices on macOS
+ Fix overflows with very large snapshot length in pcap file
+ Improve parsing of rpcapd configuration file (GitHub issue #767)
+ Handle systems without strlcpy() or strlcat() better
+ Fix crashes and other errors with invalid filter expressions
+ Fix use of uninitialized file descriptor in remote capture
+ Fix some CMake issues
+ Fix some divide-by-zero issues with the filter compiler
+ Work around a GNU libc bug in pcap_nametonetaddr()
+ Add support for DLT_LINUX_SLL2
+ Fix handling of the packet-count argument for Myricom SNF devices
+ Fix --disable-rdma in configure script (GitHub issue #782)
+ Fix compilation of TurboCap support (GitHub issue #764)
+ Constify first argument to pcap_findalldevs_ex()
+ Fix a number of issues when running rpcapd as an inetd-style daemon
+ Fix CMake issues with D-Bus libraries
+ In rpcapd, clean up termination of a capture session
+ Redo remote capture protocol negotiation
+ In rpcapd, report the same error for "invalid user name" and
+ "invalid password", to make brute-forcing harder
+ For remote captures, add an error code for "the server requires TLS"
+ Fix pcap_dump_fopen() on Windows to avoid clashes between
+ {Win,N}Pcap and application C runtimes
+ Fix exporting of functions from Windows DLLs (GitHub issue #810)
+ Fix building as part of Npcap
+ Allow rpcapd to rebind more rapidly
+ Fix building shared libpcap library on midipix (midipix.org)
+ Fix hack to detect UTF-16LE adapter names on Windows not to go past
+ the end of the string
+ Fix handling of "wireless WAN" (mobile phone network modems) on
+ Windows with WinPcap/Npcap (GitHub issue #824)
+ Have pcap_dump_open_append() create the dump file if it doesn't
+ exists (GitHub issue #247)
+ Fix the maxmum snapshot length for DLT_USBPCAP
+ Use -fPIC when building for 64-bit SPARC on Linux (GitHub issue #837)
+ Fix CMake 64-bit library installation directory on some Linux
+ distributions
+ Boost the TPACKET_V3 timeout to the maximum if a timeout of 0 was
+ specified
+ Five CVE-2019-15161, CVE-2019-15162, CVE-2019-15163, CVE-2019-15164, CVE-2019-15165
+ Fixes for CVE-2018-16301, errors in pcapng reading.
+ PCAPNG reader applies some sanity checks before doing malloc().
+
Sunday, June 24, 2018, by mcr%sandelman.ca@localhost
Summary for 1.9.0 libpcap release
Added testing system to libpcap, independent of tcpdump
diff -r 55570bbfba42 -r 76e1d2ae13c1 external/bsd/libpcap/dist/CMakeLists.txt
--- a/external/bsd/libpcap/dist/CMakeLists.txt Tue Oct 01 11:49:12 2019 +0000
+++ b/external/bsd/libpcap/dist/CMakeLists.txt Tue Oct 01 16:00:25 2019 +0000
@@ -9,7 +9,7 @@
cmake_policy(SET CMP0042 OLD)
endif()
-set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
+set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
project(pcap)
@@ -136,83 +136,6 @@
endif()
#
-# By default, build universal with the appropriate set of architectures
-# for the OS on which we're doing the build.
-#
-if(APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
- #
- # Get the major version of Darwin.
- #
- string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MAJOR "${CMAKE_SYSTEM_VERSION}")
-
- if(SYSTEM_VERSION_MAJOR LESS 8)
- #
- # Pre-Tiger. Build only for 32-bit PowerPC.
- #
- set(CMAKE_OSX_ARCHITECTURES "ppc")
- elseif(SYSTEM_VERSION_MAJOR EQUAL 8)
- #
- # Tiger. Is this prior to, or with, Intel support?
- #
- # Get the minor version of Darwin.
- #
- string(REPLACE "${SYSTEM_VERSION_MAJOR}." "" SYSTEM_MINOR_AND_PATCH_VERSION ${CMAKE_SYSTEM_VERSION})
- string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MINOR "${SYSTEM_MINOR_AND_PATCH_VERSION}")
- if(SYSTEM_VERSION_MINOR LESS 4)
- #
- # Prior to Intel support. Build for 32-bit
- # PowerPC and 64-bit PowerPC, with 32-bit PowerPC
- # first. (I'm guessing that's what Apple does.)
- #
- set(CMAKE_OSX_ARCHITECTURES "ppc;ppc64")
- elseif(SYSTEM_VERSION_MINOR LESS 7)
- #
- # With Intel support but prior to x86-64 support.
- # Build for 32-bit PowerPC, 64-bit PowerPC, and x86,
- # with 32-bit PowerPC first.
- # (I'm guessing that's what Apple does.)
- #
- set(CMAKE_OSX_ARCHITECTURES "ppc;ppc64;i386")
- else()
- #
- # With Intel support including x86-64 support.
- # Build for 32-bit PowerPC, 64-bit PowerPC, x86,
- # and x86-64, with 32-bit PowerPC first.
- # (I'm guessing that's what Apple does.)
- #
- set(CMAKE_OSX_ARCHITECTURES "ppc;ppc64;i386;x86_64")
- endif()
- elseif(SYSTEM_VERSION_MAJOR EQUAL 9)
- #
- # Leopard. Build for 32-bit PowerPC, 64-bit
- # PowerPC, x86, and x86-64, with 32-bit PowerPC
- # first. (That's what Apple does.)
- #
- set(CMAKE_OSX_ARCHITECTURES "ppc;ppc64;i386;x86_64")
- elseif(SYSTEM_VERSION_MAJOR EQUAL 10)
- #
- # Snow Leopard. Build for x86-64, x86, and
- # 32-bit PowerPC, with x86-64 first. (That's
- # what Apple does, even though Snow Leopard
- # doesn't run on PPC, so PPC libpcap runs under
- # Rosetta, and Rosetta doesn't support BPF
- # ioctls, so PPC programs can't do live
- # captures.)
- #
- set(CMAKE_OSX_ARCHITECTURES "x86_64;i386;ppc")
- else()
- #
- # Post-Snow Leopard. Build for x86-64 and
- # x86, with x86-64 first. (That's probably what
- # Apple does, given that Rosetta is gone.)
- # XXX - update if and when Apple drops support
- # for 32-bit x86 code.
- #
- set(CMAKE_OSX_ARCHITECTURES "x86_64;i386")
- endif()
-endif()
-
-#
# Additional capture modules.
#
option(DISABLE_USB "Disable USB sniffing support" OFF)
@@ -233,7 +156,7 @@
option(DISABLE_DAG "Disable Endace DAG card support" OFF)
option(DISABLE_SEPTEL "Disable Septel card support" OFF)
-set(SEPTEL_ROOT "${CMAKE_SOURCE_DIR}/../septel" CACHE PATH "Path to directory with include and lib subdirectories for Septel API")
+set(SEPTEL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../septel" CACHE PATH "Path to directory with include and lib subdirectories for Septel API")
option(DISABLE_SNF "Disable Myricom SNF support" OFF)
@@ -289,6 +212,7 @@
include(CheckFunctionExists)
include(CMakePushCheckState)
+include(CheckSymbolExists)
if(WIN32)
@@ -310,6 +234,14 @@
cmake_pop_check_state()
endif(PACKET_FOUND)
+ message(STATUS "checking for Npcap's version.h")
+ check_symbol_exists(WINPCAP_PRODUCT_NAME "../../version.h" HAVE_VERSION_H)
+ if(HAVE_VERSION_H)
+ message(STATUS "HAVE version.h")
+ else(HAVE_VERSION_H)
+ message(STATUS "MISSING version.h")
+ endif(HAVE_VERSION_H)
+
endif(WIN32)
if(MSVC)
@@ -344,6 +276,11 @@
include(CheckTypeSize)
#
+# Tests are a bit expensive with Visual Studio on Windows, so, on
+# Windows, we skip tests for UN*X-only headers and functions.
+#
+
+#
# Header files.
#
check_include_file(inttypes.h HAVE_INTTYPES_H)
@@ -395,12 +332,44 @@
#
check_function_exists(strerror HAVE_STRERROR)
check_function_exists(strerror_r HAVE_STRERROR_R)
-check_function_exists(strerror_s HAVE_STRERROR_S)
+if(HAVE_STRERROR_R)
+ #
+ # We have strerror_r; if we define _GNU_SOURCE, is it a
+ # POSIX-compliant strerror_r() or a GNU strerror_r()?
+ #
+ check_c_source_compiles(
+"#define _GNU_SOURCE
+#include <string.h>
+
+/* Define it GNU-style; that will cause an error if it's not GNU-style */
+extern char *strerror_r(int, char *, size_t);
+
+int
+main(void)
+{
+ return 0;
+}
+"
+ HAVE_GNU_STRERROR_R)
+ if(NOT HAVE_GNU_STRERROR_R)
+ set(HAVE_POSIX_STRERROR_R YES)
+ endif(NOT HAVE_GNU_STRERROR_R)
+else(HAVE_STRERROR_R)
+ #
+ # We don't have strerror_r; do we have strerror_s?
+ #
+ check_function_exists(strerror_s HAVE_STRERROR_S)
+endif(HAVE_STRERROR_R)
check_function_exists(strlcpy HAVE_STRLCPY)
check_function_exists(strlcat HAVE_STRLCAT)
check_function_exists(snprintf HAVE_SNPRINTF)
check_function_exists(vsnprintf HAVE_VSNPRINTF)
+check_function_exists(asprintf HAVE_ASPRINTF)
+check_function_exists(vasprintf HAVE_VASPRINTF)
check_function_exists(strtok_r HAVE_STRTOK_R)
+if(NOT WIN32)
+ check_function_exists(vsyslog HAVE_VSYSLOG)
+endif()
#
# These tests are for network applications that need socket functions
@@ -429,7 +398,6 @@
#
set(PCAP_LINK_LIBRARIES "")
include(CheckLibraryExists)
-include(CheckSymbolExists)
if(WIN32)
#
# We need winsock2.h and ws2tcpip.h.
@@ -865,11 +833,61 @@
)
if(WIN32)
- set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/win_snprintf.c)
+ #
+ # For now, we assume we don't have snprintf() or that it's not one
+ # that behaves enough like C99's snprintf() for our purposes (i.e.,
+ # it doesn't null-terminate the string if it truncates it to fit in
+ # the buffer), so we have to provide our own (a wrapper around
+ # _snprintf() that null-terminates the buffer).
+ #
+ # We also assume we don't have asprintf(), and provide an implementation
+ # that uses _vscprintf() to determine how big the string needs to be.
+ #
+ set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C}
+ missing/win_snprintf.c missing/win_asprintf.c)
else()
+ #
+ # Either:
+ #
+ # we have snprintf() and vsnprintf(), and have asprintf() and
+ # vasprintf();
+ #
+ # we have snprintf() and vsnprintf(), but don't have asprintf()
+ # or vasprintf();
+ #
Home |
Main Index |
Thread Index |
Old Index