pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/libpcap libpcap: updated to 1.10.1



details:   https://anonhg.NetBSD.org/pkgsrc/rev/51e7ac8b0871
branches:  trunk
changeset: 769591:51e7ac8b0871
user:      adam <adam%pkgsrc.org@localhost>
date:      Tue Nov 16 16:18:48 2021 +0000

description:
libpcap: updated to 1.10.1

Summary for 1.10.1 libpcap release (so far!)
  Packet filtering:
    Fix "type XXX subtype YYY" giving a parse error
  Source code:
    Add PCAP_AVAILABLE_1_11.
  Building and testing:
    Rename struct bpf_aux_data to avoid NetBSD compile errors
    Squelch some compiler warnings
    Squelch some Bison warnings
    Fix cross-builds with older kernels lacking BPF_MOD and BPF_XOR
    Fix Bison detection for minor version 0.
    Fix parallel build with FreeBSD make.
    Get DLT_MATCHING_MAX right in gencode.c on NetBSD.
    Define timeradd() and timersub() if necessary.
    Fix Cygwin/MSYS target directories.
    Fix symlinking with DESTDIR.
    Fix generation of libpcap.pc with CMake when not building a shared
        library.
    Check for Arm64 as well as x86-64 when looking for packet.lib on
        Windows.
  Documentation:
    Refine Markdown in README.md.
    Improve the description of portrange in filters.
    README.linux.md isn't Markdown, rename it just README.linux.
  pcapng:
    Support reading version 1.2, which some writers produce, and which
        is the same as 1.0 (some new block types were added, but
        that's not sufficient reason to bump the minor version number,
        as code that understands those new block types can handle them
        in a 1.0 file)
  Linux:
    Drop support for text-mode USB captures, as we require a 2.6.27
        or later kernel (credit to Chaoyuan Peng for noting the
        sscanf vulnerabilities in the text-mode code that got me to
        realize that we didn't need this code any more)
    Bluetooth: fix non-blocking mode.
    Don't assume that all compilers used to build for Linux support
        the __atomic builtins
  Windows:
    Add more information in "interface disappeared" error messages, in
      the hopes of trying to figure out the cause.
    Treat ERROR_DEVICE_REMOVED as "device was removed".
    Indicate in the error message which "device was removed" error
        occurred.
    Report the Windows error status if PacketSendPacket() fails.
    Use %lu for ULONGs in error message formats.
    Don't treat the inability to find airpcap.dll as an error.
    Ignore spurious error reports by Microsoft Surface mobile
        telephony modem driver
  rpcap:
    Clean up error checking and error messages for server address
        lookup.

Summary for 1.10.0 libpcap release
  Add support for capturing on DPDK devices
  Label most APIs by the first release in which they're available
  Fix some memory leaks, including in pcap_compile()
  Add pcap_datalink_val_to_description_or_dlt()
  Handle the pcap private data in a fashion that makes fewer
     assumptions about memory layouts (might fix GitHub issue #940
     on ARM)
  Fix some thread safety issues
  pcap_findalldevs(): don't sort interfaces by unit number
  Always return a list of supported time-stamp types, even if only
      host time stamps are supported
  Increase the maximum snaplen for LINKTYPE_USBPCAP/DLT_USBPCAP
  Report the DLT description in error messages
  Add pcap_init() for first-time initialization and global option
      setting; it's not required, but may be used
  Remove (unused) SITA support
  Capture file reading:
      Correctly handle pcapng captures with more than one IDB with a
          snspshot length greater than the supported maximum
  Capture file writing:
      Create the file in pcap_dump_open_append() if it doesn't exist
  Packet filtering:
      Fix "unknown ether proto 'aarp'"
      Add a new filter "ifindex" for DLT_LINUX_SLL2 files on all
          platforms and live Linux captures
      Add a hack to the optimizer to try to catch certain optimizer
          loops (should prevent GitHub issue #112)
      Show special Linux BPF offsets symbolically in bpf_image() and
          bpf_dump()
      Added support for ICMPv6 types 1-4 as tokens with names
      Remove undocumented and rather old "ether proto" protocols
      Catch invalid IPv4 addresses in filters
      Don't assume ARM supports unaligned accesses
  Security and other issues found by analysis:
      Fix various security issues reported by Charles Smith at Tangible
          Security
      Fix various security issues reported by Include Security
      Fix some issues found by cppcheck.
      Add some overflow checks in the optimizer
  rpcap:
      Support rpcap-over-TLS
      Redo protocol version negotiation to avoid problems with old
          servers (it still works with servers using the old negotiation,
          as well as servers not supporting negotiation)
      Error handling cleanups
      Add some new authentication libpcap error codes for specific
          errors
      Fix some inetd issues in rpcapd
      Fix rpcapd core dumps with invalid configuration file
      On UN*X, don't have rpcapd tell the client why authentication
          failed, so a brute-force attacker can't distinguish between
          "unknown user name" and "known user name, wrong password"
      Allow rpcapd to rebind more rapidly (GitHub issue #765)
  Documentation:
      Improve man pages, including adding backward compatibility notes
  Building and testing:
      Require, and assume, some level of C99 support in the C compiler
      Require Visual Studio 2015 or later if using Visual Studio
      Fix configure script issues, including with libnl on Linux
      Fix CMake issues
      Squelch complaints from Bison about "%define api.pure" being
          deprecated
      Fix compilation of pcap-tc.c
  Linux:
      Require PF_PACKET support, and kernel 2.6.27 or later
      Handle systems without AF_INET or AF_UNIX socket support
      Get rid of Wireless Extensions for turning monitor mode on
      Proper memory sync for PACKET_MMAP (may prevent GitHub issue
          #898)
      Drop support for libnl 1 and 2.
      Return error on interface going away, but not if it just went
          down but is still present
      Set socket protocol only after packet ring configured,
          reducing bogus packet drop reports
      Get ifdrop stats from sysfs.
      When adjusting BPF programs, do not subtract the
          SLL[2]_HDR_LEN if the location is negative (special metadata
          offset), to preserve references to metadata; see
          https://github.com/the-tcpdump-group/tcpdump/issues/480#issuecomment-486827278
      Report a warning for unknown ARPHRD types
      Have pcap_breakloop() forcibly break out of a sleeping
          capture loop
      Add support for DSA data link types
      For raw USB bus capture, use the snapshot length to set the
          buffer size, and set the len field to reflect the length
          in the URB (GitHub issue #808)
      With a timeout of zero, wait indefinitely
      Clean up support for some non-GNU libc C libraries
      Add DLT_LINUX_SLL2 for cooked-mode captures
      Probe CONFIGURATION descriptor of connected USB devices
      Treat EPERM on ethtool ioctls as meaning "not supported", as
          permissions checks are done before checking whether the
          ioctl is supported at all
  macOS:
      Cope with getting EPWROFF from SIOCGIFMEDIA
      Treat EPERM on SIOCGIFMEDIA as meaning "not supported", as
          permissions checks are done before checking whether the
          ioctl is supported at all
      Treat ENXIO when reading packets as meaning "the interface
          was removed"
      Report "the interface disappeared", not "the interface went
          down", if the interface was removed during a capture
  FreeBSD:
      Treat ENXIO as meaning "the interface was removed"
      Report "the interface disappeared", not "the interface went
          down", if the interface was removed during a capture
  NetBSD:
      Treat ENXIO as meaning "the interface was removed"
      Report "the interface disappeared", not "the interface went
          down", if the interface was removed during a capture
  OpenBSD:
      Treat EIO as meaning "the interface was removed"
      Report "the interface disappeared", not "the interface went
          down", if the interface was removed during a capture
  DragonFly BSD:
      Treat ENXIO as meaning "the interface was removed"
      Report "the interface disappeared", not "the interface went
          down", if the interface was removed during a capture
  Solaris:
      Treat ENXIO as meaning "the interface was removed"
      Report "the interface disappeared", not "the interface went
          down", if the interface was removed during a capture
  AIX:
      Fix loading of BPF kernel extension
      Treat ENXIO as meaning "the interface was removed"
      Report "the interface disappeared", not "the interface went
          down", if the interface was removed during a capture
  Windows:
      Make the snapshot length work even if pcap_setfilter()
          isn't called
      Fix compilation on Cygwin/MSYS
      Add pcap_handle(), and deprecate pcap_fileno()
      Report PCAP_ERROR_NO_SUCH_DEVICE for a non-existent device
      Return an appropriate error message for device removed or
          device unusable due to a suspend/resume
      Report a warning for unknown NdisMedium types
      Have pcap_breakloop() forcibly break out of a sleeping
          capture loop
      Clean up building DLL
      Handle CRT mismatch for pcap_dump_fopen()
      Map NdisMediumWirelessWan to DLT_RAW
      Add AirPcap support in a module, rather than using
          WinPcap/Npcap's support for it
      Report the system error for PacketSetHwFilter() failures
      Add support for getting and setting packet time stamp types
          with Npcap
      Have pcap_init() allow selecting whether the API should use
          local code page strings or UTF-8 strings (including error
          messages)
  Haiku:
      Add capture support

diffstat:

 net/libpcap/Makefile                  |   6 ++--
 net/libpcap/PLIST                     |   3 +-
 net/libpcap/distinfo                  |  11 +++----
 net/libpcap/patches/patch-Makefile.in |  50 +++++++++++++++++++---------------
 net/libpcap/patches/patch-pcap-int.h  |  22 ---------------
 5 files changed, 38 insertions(+), 54 deletions(-)

diffs (192 lines):

diff -r 4dc06a6beae7 -r 51e7ac8b0871 net/libpcap/Makefile
--- a/net/libpcap/Makefile      Tue Nov 16 16:05:31 2021 +0000
+++ b/net/libpcap/Makefile      Tue Nov 16 16:18:48 2021 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.66 2020/01/26 17:31:50 rillig Exp $
+# $NetBSD: Makefile,v 1.67 2021/11/16 16:18:48 adam Exp $
 
-DISTNAME=      libpcap-1.9.1
+DISTNAME=      libpcap-1.10.1
 CATEGORIES=    net
-MASTER_SITES=  http://www.tcpdump.org/release/
+MASTER_SITES=  https://www.tcpdump.org/release/
 
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://www.tcpdump.org/
diff -r 4dc06a6beae7 -r 51e7ac8b0871 net/libpcap/PLIST
--- a/net/libpcap/PLIST Tue Nov 16 16:05:31 2021 +0000
+++ b/net/libpcap/PLIST Tue Nov 16 16:18:48 2021 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.15 2019/10/14 20:10:19 triaxx Exp $
+@comment $NetBSD: PLIST,v 1.16 2021/11/16 16:18:48 adam Exp $
 bin/pcap-config
 include/pcap-bpf.h
 include/pcap-int.h
@@ -55,6 +55,7 @@
 man/man3/pcap_get_tstamp_precision.3
 man/man3/pcap_geterr.3
 man/man3/pcap_getnonblock.3
+man/man3/pcap_init.3
 man/man3/pcap_inject.3
 man/man3/pcap_is_swapped.3
 man/man3/pcap_lib_version.3
diff -r 4dc06a6beae7 -r 51e7ac8b0871 net/libpcap/distinfo
--- a/net/libpcap/distinfo      Tue Nov 16 16:05:31 2021 +0000
+++ b/net/libpcap/distinfo      Tue Nov 16 16:18:48 2021 +0000
@@ -1,9 +1,8 @@
-$NetBSD: distinfo,v 1.38 2021/10/26 11:05:55 nia Exp $
+$NetBSD: distinfo,v 1.39 2021/11/16 16:18:48 adam Exp $
 
-BLAKE2s (libpcap-1.9.1.tar.gz) = dba7bec94d9c707f4d64fd0849d0e79b2e93c534b3764a85236ab4261d82b200
-SHA512 (libpcap-1.9.1.tar.gz) = ae0d6b0ad8253e7e059336c0f4ed3850d20d7d2f4dc1d942c2951f99a5443a690f0cc42c6f8fdc4a0ccb19e9e985192ba6f399c4bde2c7076e420f547fddfb08
-Size (libpcap-1.9.1.tar.gz) = 861228 bytes
-SHA1 (patch-Makefile.in) = ca43b1c1e75bc9a3af5e1fa2833f99bdb72eef13
+BLAKE2s (libpcap-1.10.1.tar.gz) = c1750d08f9d70f8cce5f696e24b950a588f62520ebfc49b0a4d053dcc2a1f68d
+SHA512 (libpcap-1.10.1.tar.gz) = 56c314f19c2b857742bf8abcb1e78066986aaa95cec339b75a3c8b70a9fa2b5167da98708352f9ec97a1cea2700cfb4e040bda108d58ac46cec9b7deab88d171
+Size (libpcap-1.10.1.tar.gz) = 935221 bytes
+SHA1 (patch-Makefile.in) = 9dcba4ae88185c63543ea5a2be559efb7400c289
 SHA1 (patch-configure) = 51b8a471655e94945f8240285201886b8da324f2
 SHA1 (patch-fad-getad.c) = f7a29d558e1f3c54a143d0977deffb2be3f494ef
-SHA1 (patch-pcap-int.h) = b213697c144dc3ae17cf5dd5d9c38b99c59d81c3
diff -r 4dc06a6beae7 -r 51e7ac8b0871 net/libpcap/patches/patch-Makefile.in
--- a/net/libpcap/patches/patch-Makefile.in     Tue Nov 16 16:05:31 2021 +0000
+++ b/net/libpcap/patches/patch-Makefile.in     Tue Nov 16 16:18:48 2021 +0000
@@ -1,11 +1,11 @@
-$NetBSD: patch-Makefile.in,v 1.2 2019/10/14 20:10:19 triaxx Exp $
+$NetBSD: patch-Makefile.in,v 1.3 2021/11/16 16:18:48 adam Exp $
 
 Add libtoolization.
 Fix manpage installation.
 
---- Makefile.in.orig   2019-09-30 14:39:22.000000000 +0000
+--- Makefile.in.orig   2021-06-07 20:21:35.000000000 +0000
 +++ Makefile.in
-@@ -45,7 +45,7 @@ VPATH = @srcdir@
+@@ -46,7 +46,7 @@ VPATH = @srcdir@
  #
  
  LD = /usr/bin/ld
@@ -14,7 +14,7 @@
  AR = @AR@
  LN_S = @LN_S@
  MKDEP = @MKDEP@
-@@ -82,7 +82,8 @@ YACC = @YACC@
+@@ -84,7 +84,8 @@ BISON_BYACC = @BISON_BYACC@
  # Explicitly define compilation rule since SunOS 4's make doesn't like gcc.
  # Also, gcc does not remove the .o before forking 'as', which can be a
  # problem if you don't own the file but can write to the directory.
@@ -24,23 +24,29 @@
        @rm -f $@
        $(CC) $(FULL_CFLAGS) -c $(srcdir)/$*.c
  
-@@ -94,13 +95,13 @@ CSRC =     pcap.c gencode.c optimize.c namet
-       savefile.c sf-pcap.c sf-pcapng.c pcap-common.c \
-       bpf_image.c bpf_filter.c bpf_dump.c
- GENSRC = scanner.c grammar.c
+@@ -97,7 +98,7 @@ COMMON_C_SRC =       pcap.c gencode.c optimize
+               savefile.c sf-pcap.c sf-pcapng.c pcap-common.c \
+               bpf_image.c bpf_filter.c bpf_dump.c
+ GENERATED_C_SRC = scanner.c grammar.c
 -LIBOBJS = @LIBOBJS@
 +LIBOBJS = @LTLIBOBJS@
  
- SRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $(GENSRC)
- 
+ SRC = $(PLATFORM_C_SRC) $(PLATFORM_CXX_SRC) \
+       $(MODULE_C_SRC) $(REMOTE_C_SRC) $(COMMON_C_SRC) \
+@@ -106,9 +107,9 @@ SRC =      $(PLATFORM_C_SRC) $(PLATFORM_CXX_S
  # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot
- # hack the extra indirection
--OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS)
-+OBJ = $(PSRC:.c=.lo) $(FSRC:.c=.lo) $(CSRC:.c=.lo) $(SSRC:.c=.lo) $(GENSRC:.c=.lo) $(LIBOBJS)
+ # hack the extra indirection, and we have to handle PLATFORM_CXX_SRC
+ # differently from the defines for C source
+-OBJ = $(PLATFORM_C_SRC:.c=.o) $(PLATFORM_CXX_SRC:.cpp=.o) \
+-      $(MODULE_C_SRC:.c=.o) $(REMOTE_C_SRC:.c=.o) $(COMMON_C_SRC:.c=.o) \
+-      $(GENERATED_C_SRC:.c=.o) \
++OBJ = $(PLATFORM_C_SRC:.c=.lo) $(PLATFORM_CXX_SRC:.cpp=.lo) \
++      $(MODULE_C_SRC:.c=.lo) $(REMOTE_C_SRC:.c=.lo) $(COMMON_C_SRC:.c=.lo) \
++      $(GENERATED_C_SRC:.c=.lo) \
+       $(LIBOBJS)
+ 
  PUBHDR = \
-       pcap.h \
-       pcap-bpf.h \
-@@ -385,12 +386,10 @@ EXTRA_DIST = \
+@@ -415,12 +416,10 @@ EXTRA_DIST = \
        Win32/Prj/wpcap.vcxproj \
        Win32/Prj/wpcap.vcxproj.filters
  
@@ -56,7 +62,7 @@
  
  shared: libpcap.$(DYEXT)
  
-@@ -477,7 +476,7 @@ scanner.h: scanner.c
+@@ -507,7 +506,7 @@ scanner.h: scanner.c
                $(MAKE) $(MAKEFLAGS) scanner.c; \
        fi
  
@@ -64,8 +70,8 @@
 +scanner.lo: scanner.c grammar.h
        $(CC) $(FULL_CFLAGS) -c scanner.c
  
- grammar.c: $(srcdir)/grammar.y
-@@ -489,25 +488,25 @@ grammar.h: grammar.c
+ #
+@@ -538,25 +537,25 @@ grammar.h: grammar.c
                $(MAKE) $(MAKEFLAGS) grammar.c; \
        fi
  
@@ -98,7 +104,7 @@
        $(CC) $(FULL_CFLAGS) -o $@ -c $(srcdir)/missing/strtok_r.c
  
  #
-@@ -553,7 +552,7 @@ testprogs: FORCE
+@@ -601,7 +600,7 @@ testprogs: FORCE
  
  FORCE:
  
@@ -107,7 +113,7 @@
        [ -d $(DESTDIR)$(libdir) ] || \
            (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
        [ -d $(DESTDIR)$(includedir) ] || \
-@@ -568,62 +567,60 @@ install: install-shared install-archive 
+@@ -616,62 +615,60 @@ install: install-shared install-archive 
            (mkdir -p $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@)
        [ -d $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@ ] || \
            (mkdir -p $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@; chmod 755 $(DESTDIR)$(mandir)/man@MAN_MISC_INFO@)
@@ -210,7 +216,7 @@
        for i in $(MANFILE); do \
                $(INSTALL_DATA) `echo $$i | sed 's/.manfile.in/.manfile/'` \
                    $(DESTDIR)$(mandir)/man@MAN_FILE_FORMATS@/`echo $$i | sed 's/.manfile.in/.@MAN_FILE_FORMATS@/'`; done
-@@ -665,15 +662,15 @@ install-shared-shareda: libpcap.shareda
+@@ -713,15 +710,15 @@ install-shared-shareda: libpcap.shareda
  install-shared-none:
  
  install-archive: install-archive-$(DYEXT)
diff -r 4dc06a6beae7 -r 51e7ac8b0871 net/libpcap/patches/patch-pcap-int.h
--- a/net/libpcap/patches/patch-pcap-int.h      Tue Nov 16 16:05:31 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-$NetBSD: patch-pcap-int.h,v 1.1 2019/10/14 20:10:19 triaxx Exp $
-
-NetBSD already defines bpf_aux_data in /usr/include/net/bpf.h.
-
---- pcap-int.h.orig    2019-09-30 14:39:22.000000000 +0000
-+++ pcap-int.h
-@@ -497,6 +497,7 @@ void       sf_cleanup(pcap_t *p);
-  * Linux kernel when the kernel rejects the filter (requiring us to
-  * run it in userland).  It contains VLAN tag information.
-  */
-+#ifndef __NetBSD__
- struct bpf_aux_data {
-       u_short vlan_tag_present;
-       u_short vlan_tag;
-@@ -508,6 +509,7 @@ struct bpf_aux_data {
-  */
- u_int bpf_filter_with_aux_data(const struct bpf_insn *,
-     const u_char *, u_int, u_int, const struct bpf_aux_data *);
-+#endif
- 
- /*
-  * Internal interfaces for both "pcap_create()" and routines that



Home | Main Index | Thread Index | Old Index