Commit Graph

71 Commits

Author SHA1 Message Date
rin a8c74629f6 Support aarch64eb in */config.guess.
Cherry-picked from upstream:
https://git.savannah.gnu.org/gitweb/?p=config.git;a=commit;h=1c4398015583eb77bc043234f5734be055e64bea

Everything except external/apache2/llvm/dist/llvm/cmake/config.guess
is patched, which is under vendor tag and cannot be modified. I expect
that this file is not actually used as we use hand-crafted version of
configure script instead of cmake for building LLVM.

Note that external/apache2/llvm/autoconf/autoconf/config.guess has
already been committed on Oct. 20, but commit message disappeared as
cvs aborted due to "permission denied" when trying to modify the file
mentioned above. Sorry for confusing you.

Also note that GMP uses its own config.guess Patch for
external/lgpl3/gmp/dist/config.guess is provided by ryo@. Thanks!
2020-11-17 10:35:10 +00:00
christos 4802d37db0 PR/55599: Valery Ushakov: libpcap gets SIGBUS on strictly aligned CPUs
Define LBL_ALIGN as suggested
2020-08-29 15:05:33 +00:00
christos 9dd097b5c2 Always include the sampling member so that the struct size is consistent. 2020-04-04 21:00:03 +00:00
christos f7b51e53b0 rpcap://<host>/interface support. 2020-03-29 19:50:46 +00:00
christos 743d08fa17 make the patch compile on NetBSD 2020-03-29 19:50:23 +00:00
christos e770cc2dd9 Use http://sourceforge.net/p/libpcap/patches/_discuss/thread/fc8f43a0/ad35/\
attachment/rpcap3.patch to provide rpcap support.
2020-03-29 19:49:26 +00:00
christos c5adb460c3 need bsd.init.mk to grab Makefile.inc 2020-03-29 17:49:52 +00:00
christos 1210d4e693 Descend to sbin 2020-03-29 17:30:30 +00:00
christos 2708fb16f2 ENABLE_REMOTE and add rpcapd(8) 2020-03-29 17:12:45 +00:00
mrg de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
christos cec28d0bd7 Fix the rest of the places where strncpy was called instead of pcap_strlcpy
to copy the interface name. The kernel requires the interface to be NUL
terminated anyway and will fail with ENAMETOOLONG otherwise. Pointed out
by Robert Swindells.
2019-10-11 18:20:20 +00:00
christos bb7460091b merge conflicts 2019-10-01 16:02:11 +00:00
christos 4a71e5f388 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().
2019-10-01 16:00:25 +00:00
mrg 90bf43e918 convert HAVE_GCC == 7 to HAVE_GCC >= 7. 2019-09-30 00:06:02 +00:00
mrg 4c0e259270 ignore a format truncation issue. 2019-02-05 07:45:35 +00:00
mrg 1fcf7be45f - use -Wno-error=implicit-fallthrough with GCC7. 2019-02-04 04:05:15 +00:00
pgoyette d91f98a871 Merge the [pgoyette-compat] branch 2019-01-27 02:08:33 +00:00
christos 4a64af01e1 search first for the kernel bpf_filter.c 2018-09-05 17:10:27 +00:00
christos 355fa16a61 make sure we don't accidentally compile this file. 2018-09-05 17:10:07 +00:00
kre 577253c7c5 Yet another pcap include. 2018-09-03 21:26:19 +00:00
christos 7c368bce5d fix includes 2018-09-03 21:03:07 +00:00
kre 546b9682fd pcap/export-defs.h no longer exists, so don't attempt to install it.
Allows builds after libpcap update to get further, if there is fallout
from the file being missing elsewhere, that can be fixed later.
2018-09-03 19:32:58 +00:00
christos 3b604290f1 merge conflicts 2018-09-03 15:26:43 +00:00
christos 9185e895f1 Import libpcap-1.9.0
Sunday, June 24, 2018, by mcr@sandelman.ca
  Summary for 1.9.0 libpcap release
    Added testing system to libpcap, independent of tcpdump
    Changes to how pcap_t is activated
    Adding support for Large stream buffers on Endace DAG cards
    Changes to BSD 3-clause license to 2-clause licence
    Additions to TCP header parsing, per RFC3168
    Add CMake build process (extensive number of changes)
    Assign a value for OpenBSD DLT_OPENFLOW.
    Support setting non-blocking mode before activating.
    Extensive build support for Windows VS2010 and MINGW (many many changes, over many months)
    Added RPCAPD support when --enable-remote (default no)
    Add the rpcap daemon source and build instructions.
    Put back the greasy "save the capture filter string so we can tweak it"
        hack, that keeps libpcap from capturing rpcap traffic.
    Fixes for captures on MacOS, utun0
    fixes so that non-AF_INET addresses, are not ==AF_INET6 addresses.
    Add a linktype for IBM SDLC frames containing SNA PDUs.
    pcap_compile() in 1.8.0 and later is newly thread-safe.
    bound snaplen for linux tpacket_v2 to ~64k
    Make VLAN filter handle both metadata and inline tags
    D-Bus captures can now be up to 128MB in size
    Added LORATAP DLT value
    Added DLT_VSOCK for http://qemu-project.org/Features/VirtioVsock
    probe_devices() fixes not to overrun buffer for name of device
    Add linux-specific pcap_set_protocol_linux() to allow specifying a specific capture protocol.
    RDMA sniffing support for pcap
    Add Nordic Semiconductor Bluetooth LE sniffer link-layer header type.
    fixes for reading /etc/ethers
    Make it possible to build on Windows without packet.dll.
    Add tests for large file support on UN*X.
    Solaris fixes to work with 2.8.6
    configuration test now looks for header files, not capture devices present
    Fix to work with Berkeley YACC.
    fixes for DragonBSD compilation of pcap-netmap.c
    Clean up the ether_hostton() stuff.
    Add an option to disable Linux memory-mapped capture support.
    Add DAG API support checks.
    Add Septel, Myricom SNF, and Riverbed TurboCap checks.
    Add checks for Linux USB, Linux Bluetooth, D-Bus, and RDMA sniffing support.
    Add a check for hardware time stamping on Linux.
    Don't bother supporting pre-2005 Visual Studio.
    Increased minimum autoconf version requirement to 2.64
    Add DLT value 273 for XRA-31 sniffer
    Clean up handing of signal interrupts in pcap_read_nocb_remote().
    Use the XPG 4.2 versions of the networking APIs in Solaris.
    Fix, and better explain, the "IPv6 means IPv6, not IPv4" option setting.
    Explicitly warn that negative packet buffer timeouts should not be used.
    rpcapd: Add support inetd-likes, including xinetd.conf, and systemd units
    Rename DLT_IEEE802_15_4 to DLT_IEEE802_15_4_WITHFCS.
    Add DISPLAYPORT AUX link type
    Remove the sunos4 kernel modules and all references to them.
    Add more interface flags to pcap_findalldevs().
  Summary for 1.9.0 libpcap release (to 2017-01-25 by guy@alum.mit.edu)
    Man page improvements
    Fix Linux cooked mode userspace filtering (GitHub pull request #429)
    Fix compilation if IPv6 support not enabled
    Fix some Linux memory-mapped capture buffer size issues
    Don't fail if kernel filter can't be set on Linux (GitHub issue
      #549)
    Improve sorting of interfaces for pcap_findalldevs()
    Don't list Linux usbmon devices if usbmon module isn't loaded
    Report PCAP_ERROR_PERM_DENIED if no permission to open Linux usbmon
      devices
    Fix DLT_ type for Solaris IPNET devices
    Always return an error message for errors finding DAG or Myricom
      devices
    If possible, don't require that a device be openable when
      enumerating them for pcap_findalldevs()
    Don't put incompletely-initialized addresses in the address list for
    When finding Myricom devices, update description for regular
      interfaces that are Myricom devices and handle SNF_FLAGS=0x2(port
      aggregation enabled)
    Fix compilation error in DAG support
    Fix issues with CMake configuration
    Add support for stream buffers larger than 2GB on newer DAG cards
    Remove support for building against DAG versions without STREAMS
      support (before dag-3.0.0 2007)
2018-09-03 14:43:43 +00:00
mrg 5d873ca56c make 'clean' and/or 'cleandir' actually clean all the things. 2018-05-31 09:08:25 +00:00
ginsbach 7ab23dde59 PR lib/51952: Brad Harder: Apply upstream ada959c9
[From upstream tcpdump]
 In pcap_compile(), first check whether the pcap_t is activated.

 Before we allocate or otherwise set up anything, check whether the
 pcap_t is activated, and set the error message string and return -1 if
 it's not.

 That way, we don't go through the cleanup code in that code path -
 there's nothing to clean up.

 Fixes the issue in GitHub pull request #552.

XXX: pullup-8
2017-08-12 00:43:25 +00:00
sevan cc576e1d8e Update supporting files for components which rely on autoconf to allow systems
introducing since release of software to be recognised. This should hopefully
allow the builds to progress a littles further on systems such as the POWER8
which features a little endian 64-bit PowerPC CPU identified as ppc64le.
2017-02-01 09:26:39 +00:00
christos 0159487323 we have a cloning bpf, the config test is broken 2017-01-30 13:15:15 +00:00
christos 939f67809b propagate deadness. 2017-01-27 15:52:21 +00:00
christos 914119d9ca add another header file 2017-01-24 23:26:58 +00:00
christos f4e3756360 Add more files 2017-01-24 22:37:31 +00:00
christos db7feebfd5 merge conflicts. 2017-01-24 22:29:28 +00:00
christos a40cc363b3 Tuesday, Oct. 25, 2016 mcr@sandelman.ca
Summary for 1.8.1 libpcap release
    Add a target in Makefile.in for Exuberant Ctags use: 'extags'.
    Rename configure.in to configure.ac: autoconf 2.59
    Clean up the name-to-DLT mapping table.
    Add some newer DLT_ values: IPMI_HPM_2,ZWAVE_R1_R2,ZWAVE_R3,WATTSTOPPER_DLM,ISO_14443,RDS
    Clarify what the return values are for both success and failure.
    Many changes to build on windows
    Check for the "break the loop" condition in the inner loop for TPACKET_V3.
    Fix handling of packet count in the TPACKET_V3 inner loop: GitHub issue #493.
    Filter out duplicate looped back CAN frames.
    Fix the handling of loopback filters for IPv6 packets.
    Add a link-layer header type for RDS (IEC 62106) groups.
    Use different intermediate folders for x86 and x64 builds on Windows.
    On Linux, handle all CAN captures with pcap-linux.c, in cooked mode.
    Removes the need for the "host-endian" link-layer header type.
    Compile with '-Wused-but-marked-unused' in devel mode if supported
    Have separate DLTs for big-endian and host-endian SocketCAN headers.
    Reflect version.h being renamed to pcap_version.h.
    Require that version.h be generated: all build procedures we support generate version.h (autoconf, CMake, MSVC)!
    Properly check for sock_recv() errors.
    Re-impose some of Winsock's limitations on sock_recv().
    Replace sprintf() with pcap_snprintf().
    Fix signature of pcap_stats_ex_remote().
    Initial cmake support for remote packet capture.
    Have rpcap_remoteact_getsock() return a SOCKET and supply an "is active" flag.
    Clean up {DAG, Septel, Myricom SNF}-only builds.
    Do UTF-16-to-ASCII conversion into the right place.
    pcap_create_interface() needs the interface name on Linux.
    Clean up hardware time stamp support: the "any" device does not support any time stamp types.
    Add support for capturing on FreeBSD usbusN interfaces.
    Add a LINKTYPE/DLT_ value for FreeBSD USB.
    Go back to using PCAP_API on Windows.
    CMake support
    Add TurboCap support from WinPcap.
    Recognize 802.1ad nested VLAN tag in vlan filter.

Thursday Sep. 3, 2015 guy@alum.mit.edu
  Summary for 1.7.5 libpcap release
	Man page cleanups.
	Add some allocation failure checks.
	Fix a number of Linux/ucLinux configure/build issues.
	Fix some memory leaks.
	Recognize 802.1ad nested VLAN tag in vlan filter.
	Fix building Bluetooth Linux Monitor support with BlueZ 5.1+

Saturday Jun. 27, 2015 mcr@sandelman.ca
  Summary for 1.7.4 libpcap release
	Include fix for GitHub issue #424 -- out of tree builds.

Friday Apr. 10, 2015 guy@alum.mit.edu
  Summary for 1.7.3 libpcap release
	Work around a Linux bonding driver bug.
2017-01-24 21:55:26 +00:00
joerg 503be5a657 Simplify to avoid negation-only-applies-to-LHS warning. 2015-08-28 11:20:55 +00:00
christos b554e5dbff don't forget to include config.h otherwise it thinks we don't have vnsnprintf
and fortify compiles fail.
2015-04-05 22:36:36 +00:00
christos bd64c25012 merge conflicts 2015-03-31 21:39:42 +00:00
christos f907ecca40 Numbers seem to be off here:
Thursday Feb. 12, 2015 guy@alum.mit.edu/mcr@sandelman.ca
  Summary for 1.8.0 libpcap release
        Support for filtering Geneve encapsulated packets.

Wednesday Nov. 12, 2014 guy@alum.mit.edu/mcr@sandelman.ca
  Summary for 1.7.0 libpcap release
        Fix handling of zones for BPF on Solaris
        new DLT for ZWAVE
        clarifications for read timeouts.
        added bpf_filter1() with extensions
        some fixes to compilation without stdint.h
        EBUSY can now be returned by SNFv3 code.
2015-03-31 21:25:19 +00:00
christos d91862193c merge changes 2014-11-19 19:33:30 +00:00
christos 74e9dc92b2 import newest libpcap 2014-11-19 18:04:51 +00:00
pooka 7489153341 Re-add cloning bpf definition that got lost in rev 1.4.
Needed at least for wpa_supplicant against a rump kernel (which does
not create the old-style bpf0000 device nodes).
2014-04-07 01:29:12 +00:00
christos 511f4361e2 resolve conflicts. 2013-12-31 17:08:14 +00:00
christos 7e05f63e56 Import libpcap-1.5.2 2013-12-31 16:57:18 +00:00
christos ad59ad05be add the rest of the man pages. 2013-04-07 00:18:55 +00:00
christos 2fcf5de83d moved script out 2013-04-06 17:50:33 +00:00
christos 07fc359697 install in /lib per rmind's request 2013-04-06 17:36:40 +00:00
christos 17e55052cd new libpcap 2013-04-06 17:29:12 +00:00
christos de62228d07 import 1.3.0 2013-04-06 15:57:39 +00:00
christos 2d62d9f82b define HAVE_CLONING_BPF. 2013-02-20 01:39:02 +00:00
christos 7abb9aefee Don't use libpcap's bpf file, but use our own:
1. include <net/dlt.h> where needed since we have the information in a separate
   file.
2. #error in pcap/bpf.h to make sure it is not being used.
3. If we don't include <pcap/bpf.h> include <net/bpf.h> instead.
4. Install symlinks instead of copies of files.
2011-12-21 19:00:27 +00:00
plunky f65a48c2ec max WARNS is 4 2011-10-13 17:23:28 +00:00