From owner-freebsd-mips@freebsd.org Mon May 4 19:54:44 2020 Return-Path: Delivered-To: freebsd-mips@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 845102C1461; Mon, 4 May 2020 19:54:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49GD8g3Pdsz3Dr0; Mon, 4 May 2020 19:54:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qk1-f177.google.com with SMTP id t3so926433qkg.1; Mon, 04 May 2020 12:54:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=mKt3EubvQYpRzjJzDNdvdHjdAtYGj0Hwd4moErjBGGY=; b=EKUybAZcDSOm7n0AUh+A8/JiG2sk6J6h9igOIiwmf7YBEElfzJz7MFt8+iBhh8iJR8 opKP8C15L+2nsm0zOHpE3LHJj7CrfwmizOZuBoIHpI+LC7GNOQ5YN7Mzb3G/HjEjPO5B BHFEPUev3TXpWrjjq7t3b/UvtbuzBd1B7yTkuTjFD9aATbQYubZmNWJKOxuWfMCpWFni G2GyIgWiNchjWGjVOGOuPK/oO1/jmauyw2DxBR3SeYFFDfoxrMjzf1nWy4omSK6VSTNs lb9+FImnjTvmgE5ZN1U3dWSWN/GN9ylaclggEDCcoLnH4nkGDHxsLvlUUsPg+ZmNGU6u 3GNQ== X-Gm-Message-State: AGi0PuZ4PKI0vXsmEZh60CMRgItGJ7swtoND91JtUEf7j2xa8dczCGrh 6ps6TDYRVVViCZm6zAmeJ4Q7FdACWRoBYgFPH49OkxOH X-Google-Smtp-Source: APiQypIum6swZAJGJyu3c/1XDxkxfDY+txM0luMKZYKtAelXPmFONKng9XcM5fhh14lX44g8tFZrMmAuOiQ7Cl3PAvw= X-Received: by 2002:a37:6690:: with SMTP id a138mr18677qkc.152.1588622080072; Mon, 04 May 2020 12:54:40 -0700 (PDT) MIME-Version: 1.0 References: <201912212101.xBLL14sr033938@repo.freebsd.org> In-Reply-To: <201912212101.xBLL14sr033938@repo.freebsd.org> From: Adrian Chadd Date: Mon, 4 May 2020 12:54:27 -0700 Message-ID: Subject: Re: svn commit: r355988 - in head: contrib/libpcap contrib/libpcap/cmake/Modules contrib/libpcap/doc contrib/libpcap/missing contrib/libpcap/msdos contrib/libpcap/pcap contrib/libpcap/rpcapd contrib/li... To: Cy Schubert , "freebsd-mips@freebsd.org" , freebsd-wireless Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 49GD8g3Pdsz3Dr0 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 209.85.222.177 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-3.05 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-1.05)[ip: (-4.40), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[177.222.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[177.222.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2020 19:54:44 -0000 hi, This commit /seems/ to have broken things on FreeBSD-HEAD on mips74k. I haven't yet tried hostapd mode on x86 with this commit; I"ll do that soon. The TL;DR: * hostapd + wpa encryption + mips32 (mips74k in this instance) fails on -HEAD! Woo! * l2_packet_freebsd.c in hostapd uses a pcap filter to filter out eapol frames from other parties to the eapol/raw receive socket; * the filter compilation causes an unaligned access on mips, which i /thought/ we handled correctly, but apparently not; * the filter as written in hostapd doesn't result in anything being receive= d. The unaligned warn is: Unaligned Load Word: pid=3D426 (tcpdump), tid=3D100040, pc=3D0x40569034, badvaddr=3D0x4051d02a (I dno't yet have the line of code, that's next too.) The filter is: *** Filter is "not ether src c4:6e:1f:5b:04:f7 and ( ether dst c4:6e:1f:5b:04:f7 or ether dst 01:80:c2:00:00:03 ) and ether proto 0x888e" I'll dig into the details some more soon. Thanks, -adrian On Sat, 21 Dec 2019 at 13:01, Cy Schubert wrote: > > Author: cy > Date: Sat Dec 21 21:01:03 2019 > New Revision: 355988 > URL: https://svnweb.freebsd.org/changeset/base/355988 > > Log: > MFV r353141 (by phillip): > > Update libpcap from 1.9.0 to 1.9.1. > > MFC after: 2 weeks > > Added: > head/contrib/libpcap/CONTRIBUTING.md > - copied unchanged from r353141, vendor/libpcap/dist/CONTRIBUTING.md > head/contrib/libpcap/INSTALL.md > - copied unchanged from r353141, vendor/libpcap/dist/INSTALL.md > head/contrib/libpcap/README.md > - copied unchanged from r353141, vendor/libpcap/dist/README.md > head/contrib/libpcap/doc/ > - copied from r353141, vendor/libpcap/dist/doc/ > head/contrib/libpcap/missing/asprintf.c > - copied unchanged from r353141, vendor/libpcap/dist/missing/asprint= f.c > head/contrib/libpcap/missing/strlcat.c > - copied unchanged from r353141, vendor/libpcap/dist/missing/strlcat= .c > head/contrib/libpcap/missing/strlcpy.c > - copied unchanged from r353141, vendor/libpcap/dist/missing/strlcpy= .c > head/contrib/libpcap/missing/win_asprintf.c > - copied unchanged from r353141, vendor/libpcap/dist/missing/win_asp= rintf.c > head/contrib/libpcap/pcap/socket.h > - copied unchanged from r353141, vendor/libpcap/dist/pcap/socket.h > head/contrib/libpcap/pcap_set_immediate_mode.3pcap.in > - copied unchanged from r353141, vendor/libpcap/dist/pcap_set_immedi= ate_mode.3pcap.in > head/contrib/libpcap/pcap_set_protocol_linux.3pcap > - copied unchanged from r353141, vendor/libpcap/dist/pcap_set_protoc= ol_linux.3pcap > head/contrib/libpcap/rpcapd/ > - copied from r353141, vendor/libpcap/dist/rpcapd/ > head/contrib/libpcap/testprogs/ > - copied from r353141, vendor/libpcap/dist/testprogs/ > Deleted: > head/contrib/libpcap/CONTRIBUTING > head/contrib/libpcap/INSTALL.txt > head/contrib/libpcap/README > head/contrib/libpcap/README.Win32 > head/contrib/libpcap/README.aix > head/contrib/libpcap/README.dag > head/contrib/libpcap/README.hpux > head/contrib/libpcap/README.linux > head/contrib/libpcap/README.macos > head/contrib/libpcap/README.septel > head/contrib/libpcap/README.sita > head/contrib/libpcap/README.tru64 > head/contrib/libpcap/cmake/Modules/FindPthreads-w32.cmake > head/contrib/libpcap/pcap_set_immediate_mode.3pcap > head/contrib/libpcap/pcap_set_protocol.3pcap > Modified: > head/contrib/libpcap/CHANGES > head/contrib/libpcap/CMakeLists.txt > head/contrib/libpcap/CREDITS > head/contrib/libpcap/Makefile.in > head/contrib/libpcap/VERSION > head/contrib/libpcap/aclocal.m4 > head/contrib/libpcap/bpf_filter.c > head/contrib/libpcap/cmake/Modules/FindPacket.cmake > head/contrib/libpcap/cmakeconfig.h.in > head/contrib/libpcap/config.guess > head/contrib/libpcap/config.h.in > head/contrib/libpcap/config.sub > head/contrib/libpcap/configure > head/contrib/libpcap/configure.ac > head/contrib/libpcap/diag-control.h > head/contrib/libpcap/fmtutils.c > head/contrib/libpcap/fmtutils.h > head/contrib/libpcap/ftmacros.h > head/contrib/libpcap/gencode.c > head/contrib/libpcap/gencode.h > head/contrib/libpcap/grammar.y > head/contrib/libpcap/missing/snprintf.c > head/contrib/libpcap/missing/win_snprintf.c > head/contrib/libpcap/msdos/readme.dos > head/contrib/libpcap/nametoaddr.c > head/contrib/libpcap/optimize.c > head/contrib/libpcap/pcap-bpf.c > head/contrib/libpcap/pcap-bt-linux.c > head/contrib/libpcap/pcap-bt-monitor-linux.c > head/contrib/libpcap/pcap-common.c > head/contrib/libpcap/pcap-common.h > head/contrib/libpcap/pcap-dag.c > head/contrib/libpcap/pcap-dlpi.c > head/contrib/libpcap/pcap-dos.c > head/contrib/libpcap/pcap-filter.manmisc.in > head/contrib/libpcap/pcap-int.h > head/contrib/libpcap/pcap-libdlpi.c > head/contrib/libpcap/pcap-linktype.manmisc.in > head/contrib/libpcap/pcap-linux.c > head/contrib/libpcap/pcap-netfilter-linux.c > head/contrib/libpcap/pcap-netmap.c > head/contrib/libpcap/pcap-new.c > head/contrib/libpcap/pcap-npf.c > head/contrib/libpcap/pcap-null.c > head/contrib/libpcap/pcap-rpcap.c > head/contrib/libpcap/pcap-rpcap.h > head/contrib/libpcap/pcap-savefile.manfile.in > head/contrib/libpcap/pcap-septel.c > head/contrib/libpcap/pcap-sita.c > head/contrib/libpcap/pcap-sita.html > head/contrib/libpcap/pcap-snf.c > head/contrib/libpcap/pcap-tc.c > head/contrib/libpcap/pcap-tstamp.manmisc.in > head/contrib/libpcap/pcap-usb-linux.c > head/contrib/libpcap/pcap.3pcap.in > head/contrib/libpcap/pcap.c > head/contrib/libpcap/pcap/bpf.h > head/contrib/libpcap/pcap/compiler-tests.h > head/contrib/libpcap/pcap/dlt.h > head/contrib/libpcap/pcap/funcattrs.h > head/contrib/libpcap/pcap/nflog.h > head/contrib/libpcap/pcap/pcap-inttypes.h > head/contrib/libpcap/pcap/pcap.h > head/contrib/libpcap/pcap/sll.h > head/contrib/libpcap/pcap_activate.3pcap > head/contrib/libpcap/pcap_breakloop.3pcap > head/contrib/libpcap/pcap_can_set_rfmon.3pcap > head/contrib/libpcap/pcap_compile.3pcap.in > head/contrib/libpcap/pcap_create.3pcap > head/contrib/libpcap/pcap_datalink.3pcap.in > head/contrib/libpcap/pcap_datalink_name_to_val.3pcap > head/contrib/libpcap/pcap_datalink_val_to_name.3pcap > head/contrib/libpcap/pcap_dump.3pcap > head/contrib/libpcap/pcap_dump_file.3pcap > head/contrib/libpcap/pcap_dump_flush.3pcap > head/contrib/libpcap/pcap_dump_ftell.3pcap > head/contrib/libpcap/pcap_dump_open.3pcap.in > head/contrib/libpcap/pcap_file.3pcap > head/contrib/libpcap/pcap_fileno.3pcap > head/contrib/libpcap/pcap_findalldevs.3pcap > head/contrib/libpcap/pcap_freecode.3pcap > head/contrib/libpcap/pcap_get_required_select_timeout.3pcap > head/contrib/libpcap/pcap_get_selectable_fd.3pcap > head/contrib/libpcap/pcap_get_tstamp_precision.3pcap.in > head/contrib/libpcap/pcap_geterr.3pcap > head/contrib/libpcap/pcap_inject.3pcap > head/contrib/libpcap/pcap_is_swapped.3pcap > head/contrib/libpcap/pcap_list_datalinks.3pcap.in > head/contrib/libpcap/pcap_list_tstamp_types.3pcap.in > head/contrib/libpcap/pcap_lookupdev.3pcap > head/contrib/libpcap/pcap_lookupnet.3pcap > head/contrib/libpcap/pcap_loop.3pcap > head/contrib/libpcap/pcap_major_version.3pcap > head/contrib/libpcap/pcap_next_ex.3pcap > head/contrib/libpcap/pcap_offline_filter.3pcap > head/contrib/libpcap/pcap_open_dead.3pcap.in > head/contrib/libpcap/pcap_open_live.3pcap > head/contrib/libpcap/pcap_open_offline.3pcap.in > head/contrib/libpcap/pcap_set_datalink.3pcap > head/contrib/libpcap/pcap_set_timeout.3pcap > head/contrib/libpcap/pcap_set_tstamp_precision.3pcap.in > head/contrib/libpcap/pcap_set_tstamp_type.3pcap.in > head/contrib/libpcap/pcap_setdirection.3pcap > head/contrib/libpcap/pcap_setfilter.3pcap > head/contrib/libpcap/pcap_setnonblock.3pcap > head/contrib/libpcap/pcap_snapshot.3pcap > head/contrib/libpcap/pcap_stats.3pcap > head/contrib/libpcap/pcap_strerror.3pcap > head/contrib/libpcap/pcap_tstamp_type_name_to_val.3pcap > head/contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap > head/contrib/libpcap/portability.h > head/contrib/libpcap/rpcap-protocol.h > head/contrib/libpcap/savefile.c > head/contrib/libpcap/scanner.l > head/contrib/libpcap/sf-pcap.c > head/contrib/libpcap/sf-pcap.h > head/contrib/libpcap/sf-pcapng.c > head/contrib/libpcap/sf-pcapng.h > head/contrib/libpcap/sockutils.c > head/contrib/libpcap/sockutils.h > head/lib/libpcap/Makefile > head/lib/libpcap/config.h > head/sys/net/dlt.h > Directory Properties: > head/contrib/libpcap/ (props changed) > > Modified: head/contrib/libpcap/CHANGES > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/libpcap/CHANGES Sat Dec 21 19:23:33 2019 (= r355987) > +++ head/contrib/libpcap/CHANGES Sat Dec 21 21:01:03 2019 (= r355988) > @@ -1,5 +1,129 @@ > -Wednesday, Jan. 25, 2017 guy@alum.mit.edu > +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 > 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 chan= ges, 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 =3D=3DAF_INET6 addresse= s. > + 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 s= pecific 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 p= resent > + 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 sett= ing. > + Explicitly warn that negative packet buffer timeouts should not be u= sed. > + 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 > > Modified: head/contrib/libpcap/CMakeLists.txt > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/libpcap/CMakeLists.txt Sat Dec 21 19:23:33 2019 (= r355987) > +++ head/contrib/libpcap/CMakeLists.txt Sat Dec 21 21:01:03 2019 (= r355988) > @@ -9,7 +9,7 @@ if(POLICY CMP0042) > 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 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") > 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_PA= TCH_VERSION ${CMAKE_SYSTEM_VERSION}) > - string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MINOR "${SYSTEM_MI= NOR_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_RDMA "Disable RDMA sniffing support" O= F > 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 dire= ctory 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) > > @@ -251,7 +174,7 @@ option(YYDEBUG "Build parser debugging code" OFF) > > # Get, parse, format and set pcap's version string from [pcap_root]/VERS= ION > # for later use. > - > + > # Get MAJOR, MINOR, PATCH & SUFFIX > file(STRINGS ${pcap_SOURCE_DIR}/VERSION > PACKAGE_VERSION > @@ -264,7 +187,7 @@ string(REGEX MATCH "^([0-9]+)" PACKAGE_VERSION_MAJOR = " > # Get MAJOR, MINOR & PATCH > string(REGEX MATCH "^([0-9]+.)?([0-9]+.)?([0-9]+)" PACKAGE_VERSION_NOSUF= FIX "${PACKAGE_VERSION}") > > -if(WIN32) > +if(WIN32) > # Convert PCAP_VERSION_NOSUFFIX to Windows preferred version format > string(REPLACE "." "," PACKAGE_VERSION_PREDLL ${PACKAGE_VERSION_NOSU= FFIX}) > > @@ -289,6 +212,7 @@ include_directories( > > include(CheckFunctionExists) > include(CMakePushCheckState) > +include(CheckSymbolExists) > > if(WIN32) > > @@ -310,6 +234,14 @@ if(WIN32) > cmake_pop_check_state() > endif(PACKET_FOUND) > > + message(STATUS "checking for Npcap's version.h") > + check_symbol_exists(WINPCAP_PRODUCT_NAME "../../version.h" HAVE_VERS= ION_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(CheckStructHasMember) > 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 @@ endif(NOT WIN32) > # > 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 > + > +/* 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 @@ check_function_exists(strtok_r HAVE_STRTOK_R) > # > set(PCAP_LINK_LIBRARIES "") > include(CheckLibraryExists) > -include(CheckSymbolExists) > if(WIN32) > # > # We need winsock2.h and ws2tcpip.h. > @@ -865,11 +833,61 @@ set(PROJECT_SOURCE_LIST_C > ) > > if(WIN32) > - set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/win_snpri= ntf.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 implementa= tion > + # 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(); > + # > + # we have neither snprintf() nor vsnprintf(), and don't have > + # asprintf() or vasprintf(), either. > + # > + # We assume that if we have asprintf() we have vasprintf(), as well > + # as snprintf() and vsnprintf(), and that if we have snprintf() we > + # have vsnprintf(). > + # > + # For the first case, we don't need any replacement routines. > + # For the second case, we need replacement asprintf()/vasprintf() > + # routines. > + # For the third case, we need replacement snprintf()/vsnprintf() and > + # asprintf()/vasprintf() routines. > + # > if(NOT HAVE_SNPRINTF) > + # > + # We assume we have none of them; missing/snprintf.c supplies > + # all of them. > + # > set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/snpri= ntf.c) > - endif(NOT HAVE_SNPRINTF) > + elif(NOT HAVE_ASPRINTF) > + # > + # We assume we have snprintf()/vsnprintf() but lack > + # asprintf()/vasprintf(); missing/asprintf.c supplies > + # the latter (using vsnprintf()). > + # > + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/aspri= ntf.c) > + endif() > + if(NOT HAVE_STRLCAT) > + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/strlc= at.c) > + endif(NOT HAVE_STRLCAT) > + if(NOT HAVE_STRLCPY) > + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/strlc= py.c) > + endif(NOT HAVE_STRLCPY) > if(NOT HAVE_STRTOK_R) > set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/strto= k_r.c) > endif(NOT HAVE_STRTOK_R) > @@ -931,13 +949,16 @@ else() > # as it's a Linux, it should use packet sockets, > # instead. > # > - # > # We need: > # > # sys/types.h, because FreeBSD 10's net/bpf.h > # requires that various BSD-style integer types > # be defined; > # > + # sys/time.h, because AIX 5.2 and 5.3's net/bpf.h > + # doesn't include it but does use struct timeval > + # in ioctl definitions; > + # > # sys/ioctl.h and, if we have it, sys/ioccom.h, > # because net/bpf.h defines ioctls; > # > @@ -952,9 +973,9 @@ else() > # of those headers itself. > # > if(HAVE_SYS_IOCCOM_H) > - check_symbol_exists(BIOCSETIF "sys/types.h;sys/ioctl.h;s= ys/socket.h;sys/ioccom.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF) > + check_symbol_exists(BIOCSETIF "sys/types.h;sys/time.h;sy= s/ioctl.h;sys/socket.h;sys/ioccom.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCS= ETIF) > else(HAVE_SYS_IOCCOM_H) > - check_symbol_exists(BIOCSETIF "sys/types.h;sys/ioctl.h;s= ys/socket.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF) > + check_symbol_exists(BIOCSETIF "sys/types.h;sys/time.h;sy= s/ioctl.h;sys/socket.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF) > endif(HAVE_SYS_IOCCOM_H) > endif(HAVE_NET_BPF_H) > check_include_file(net/pfilt.h HAVE_NET_PFILT_H) > @@ -1436,7 +1457,28 @@ if(NOT DISABLE_DBUS) > set(PCAP_SUPPORT_DBUS TRUE) > set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-dbus.c) > include_directories(${DBUS_INCLUDE_DIRS}) > - set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${DBUS_LIBRARIES}= ) > + > + # > + # This "helpfully" supplies DBUS_LIBRARIES as a bunch of > + # library names - not paths - and DBUS_LIBRARY_DIRS as > + # a bunch of directories. > + # > + # CMake *really* doesn't like the notion of specifying "here are > + # the directories in which to look for libraries" except in > + # find_library() calls; it *really* prefers using full paths to > + # library files, rather than library names. > + # > + # Find the libraries and add their full paths. > + # > + set(DBUS_LIBRARY_FULLPATHS) > + foreach(_lib IN LISTS DBUS_LIBRARIES) > + # > + # Try to find this library, so we get its full path. > + # > + find_library(_libfullpath ${_lib} HINTS ${DBUS_LIBRARY_DIRS}= ) > + list(APPEND DBUS_LIBRARY_FULLPATHS ${_libfullpath}) > + endforeach() > + set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${DBUS_LIBRARY_FU= LLPATHS}) > endif(DBUS_FOUND) > endif(NOT DISABLE_DBUS) > > @@ -1499,7 +1541,7 @@ if(NOT DISABLE_DAG) > endif() > endif() > endif() > -endif() > +endif() > > # Check for Septel card support. > set(PROJECT_EXTERNAL_OBJECT_LIST "") > @@ -1521,7 +1563,7 @@ if(NOT DISABLE_SEPTEL) > set(PROJECT_EXTERNAL_OBJECT_LIST ${PROJECT_EXTERNAL_OBJECT_LIST}= "${SEPTEL_ROOT}/asciibin.o ${SEPTEL_ROOT}/bit2byte.o ${SEPTEL_ROOT}/confir= m.o ${SEPTEL_ROOT}/fmtmsg.o ${SEPTEL_ROOT}/gct_unix.o ${SEPTEL_ROOT}/hqueue= .o ${SEPTEL_ROOT}/ident.o ${SEPTEL_ROOT}/mem.o ${SEPTEL_ROOT}/pack.o ${SEPT= EL_ROOT}/parse.o ${SEPTEL_ROOT}/pool.o ${SEPTEL_ROOT}/sdlsig.o ${SEPTEL_ROO= T}/strtonum.o ${SEPTEL_ROOT}/timer.o ${SEPTEL_ROOT}/trace.o") > set(HAVE_SEPTEL_API TRUE) > endif() > -endif() > +endif() > > # Check for Myricom SNF support. > if(NOT DISABLE_SNF) > @@ -1542,7 +1584,7 @@ if(NOT DISABLE_SNF) > set(HAVE_SNF_API TRUE) > set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${SNF_LIBRARIES}) > endif() > -endif() > +endif() > > # Check for Riverbed TurboCap support. > if(NOT DISABLE_TC) > @@ -1563,7 +1605,7 @@ if(NOT DISABLE_TC) > set(HAVE_TC_API TRUE) > set(PCAP_LINK_LIBRARIES "${PCAP_LINK_LIBRARIES} ${TC_LIBRARIES} = ${CMAKE_USE_PTHREADS_INIT} stdc++") > endif() > -endif() > +endif() > > # > # Remote capture support. > @@ -1582,7 +1624,7 @@ if(ENABLE_REMOTE) > # the check. > # > cmake_push_check_state() > - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_SOURCE_DIR}) > + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}) > check_struct_has_member("struct msghdr" msg_control "ftmacros.h;sys/= socket.h" HAVE_STRUCT_MSGHDR_MSG_CONTROL) > check_struct_has_member("struct msghdr" msg_flags "ftmacros.h;sys/so= cket.h" HAVE_STRUCT_MSGHDR_MSG_FLAGS) > cmake_pop_check_state() > @@ -1597,7 +1639,7 @@ endif(ENABLE_REMOTE) > # > # Check and add warning options if we have a .devel file. > # > -if(EXISTS ${CMAKE_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DIR}/.deve= l) > +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DI= R}/.devel) > # > # Warning options. > # > @@ -1808,10 +1850,12 @@ set_source_files_properties(${CMAKE_CURRENT_BINAR= Y_DIR > > # > # Assume, by default, no support for shared libraries and V7/BSD > -# convention for man pages (file formats in section 5, miscellaneous > -# info in section 7, administrative commands and daemons in section 8). > +# convention for man pages (devices in section 4, file formats in > +# section 5, miscellaneous info in section 7, administrative commands > +# and daemons in section 8). Individual cases can override this. > # Individual cases can override this. > # > +set(MAN_DEVICES 4) > set(MAN_FILE_FORMATS 5) > set(MAN_MISC_INFO 7) > set(MAN_ADMIN_COMMANDS 8) > @@ -1869,6 +1913,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "OSF1") > # > set(MAN_FILE_FORMATS 4) > set(MAN_MISC_INFO 5) > + set(MAN_DEVICES 7) > elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCH= ES "5[.][0-9.]*") > # > # SunOS 5.x. > @@ -1892,6 +1937,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE= _SY > set(MAN_ADMIN_COMMANDS 1m) > set(MAN_FILE_FORMATS 4) > set(MAN_MISC_INFO 5) > + set(MAN_DEVICES 7D) > endif() > endif() > > @@ -1944,6 +1990,16 @@ if(BUILD_SHARED_LIBS) > add_dependencies(${LIBRARY_NAME} SerializeTarget) > set_target_properties(${LIBRARY_NAME} PROPERTIES > COMPILE_DEFINITIONS BUILDING_PCAP) > + # > + # No matter what the library is called - it might be called "wpcap" > + # in a Windows build - the symbol to define to indicate that we're > + # building the library, rather than a program using the library, > + # and thus that we're exporting functions defined in our public > + # header files, rather than importing those functions, is > + # pcap_EXPORTS. > + # > + set_target_properties(${LIBRARY_NAME} PROPERTIES > + DEFINE_SYMBOL pcap_EXPORTS) > endif(BUILD_SHARED_LIBS) > > add_library(${LIBRARY_NAME}_static STATIC > @@ -1982,7 +2038,7 @@ if(WIN32) > # For compatibility, build the shared library without the "lib" = prefix on > # MinGW as well. > # > - set_target_properties(${LIBRARY_NAME} PROPERTIES > + set_target_properties(${LIBRARY_NAME} PROPERTIES > PREFIX "" > OUTPUT_NAME "${LIBRARY_NAME}" > ) > @@ -2020,6 +2076,118 @@ if(NOT C_ADDITIONAL_FLAGS STREQUAL "") > set_target_properties(${LIBRARY_NAME}_static PROPERTIES COMPILE_FLAG= S ${C_ADDITIONAL_FLAGS}) > endif() > > +# > +# On macOS, build libpcap for the appropriate architectures, if > +# CMAKE_OSX_ARCHITECTURES isn't set (if it is, let that control > +# the architectures for which to build it). > +# > +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(OSX_LIBRARY_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_PA= TCH_VERSION ${CMAKE_SYSTEM_VERSION}) > + string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MINOR "${SYSTEM_MI= NOR_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(OSX_LIBRARY_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 32-bit x86, > + # with 32-bit PowerPC first. > + # (I'm guessing that's what Apple does.) > + # > + set(OSX_LIBRARY_ARCHITECTURES "ppc;ppc64;i386") > + else() > + # > + # With Intel support including x86-64 support. > + # Build for 32-bit PowerPC, 64-bit PowerPC, 32-bit x86, > + # and x86-64, with 32-bit PowerPC first. > + # (I'm guessing that's what Apple does.) > + # > + set(OSX_LIBRARY_ARCHITECTURES "ppc;ppc64;i386;x86_64") > + endif() > + elseif(SYSTEM_VERSION_MAJOR EQUAL 9) > + # > + # Leopard. Build for 32-bit PowerPC, 64-bit > + # PowerPC, 32-bit x86, and x86-64, with 32-bit PowerPC > + # first. (That's what Apple does.) > + # > + set(OSX_LIBRARY_ARCHITECTURES "ppc;ppc64;i386;x86_64") > + elseif(SYSTEM_VERSION_MAJOR EQUAL 10) > + # > + # Snow Leopard. Build for x86-64, 32-bit 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(OSX_LIBRARY_ARCHITECTURES "x86_64;i386;ppc") > + else() > + # > + # Post-Snow Leopard. Build for x86-64 and 32-bit x86, > + # with x86-64 first. (That's what Apple does) > + # XXX - update if and when Apple drops support > + # for 32-bit x86 code and if and when Apple adds > + # ARM-based Macs. (You're on your own for iOS etc.) > + # > + # XXX - check whether we *can* build for i386 and, if not, > + # suggest that the user install the /usr/include headers if > + # they want to build fat. > + # > + cmake_push_check_state() > + set(CMAKE_REQUIRED_FLAGS "-arch i386") > + check_c_source_compiles( > +"int > +main(void) > +{ > + return 0; > +} > +" > + X86_32_BIT_SUPPORTED) > + cmake_pop_check_state() > + if(X86_32_BIT_SUPPORTED) > + set(OSX_LIBRARY_ARCHITECTURES "x86_64;i386") > + else() > + set(OSX_LIBRARY_ARCHITECTURES "x86_64") > + if(SYSTEM_VERSION_MAJOR LESS 18) > + # > + # Pre-Mojave; the command-line tools should be sufficien= t to > + # enable 32-bit x86 builds. > + # > + message(WARNING "Compiling for 32-bit x86 gives an error= ; try installing the command-line tools") > + else() > + message(WARNING "Compiling for 32-bit x86 gives an error= ; try installing the command-line tools and, after that, installing the /us= r/include headers from the /Library/Developer/CommandLineTools/Packages/mac= OS_SDK_headers_for_macOS_10.14.pkg package") > + endif() > + endif() > + endif() > + if(BUILD_SHARED_LIBS) > + set_target_properties(${LIBRARY_NAME} PROPERTIES > + OSX_ARCHITECTURES "${OSX_LIBRARY_ARCHITECTURES}") > + endif(BUILD_SHARED_LIBS) > + set_target_properties(${LIBRARY_NAME}_static PROPERTIES > + OSX_ARCHITECTURES "${OSX_LIBRARY_ARCHITECTURES}") > +endif() > + > ###################################### > # Write out the config.h file > ###################################### > @@ -2079,6 +2247,7 @@ set(MAN3PCAP_EXPAND > pcap_list_tstamp_types.3pcap.in > pcap_open_dead.3pcap.in > pcap_open_offline.3pcap.in > + pcap_set_immediate_mode.3pcap.in > pcap_set_tstamp_precision.3pcap.in > pcap_set_tstamp_type.3pcap.in > ) > @@ -2114,9 +2283,8 @@ set(MAN3PCAP_NOEXPAND > pcap_open_live.3pcap > pcap_set_buffer_size.3pcap > pcap_set_datalink.3pcap > - pcap_set_immediate_mode.3pcap > pcap_set_promisc.3pcap > - pcap_set_protocol.3pcap > + pcap_set_protocol_linux.3pcap > pcap_set_rfmon.3pcap > pcap_set_snaplen.3pcap > pcap_set_timeout.3pcap > @@ -2179,11 +2347,13 @@ if(WIN32) > endif(NOT MINGW) > endif(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) > else(WIN32) > - install(TARGETS ${LIBRARY_NAME} ${LIBRARY_NAME_STATIC} DESTINATION l= ib) > + install(TARGETS ${LIBRARY_NAME} ${LIBRARY_NAME_STATIC} DESTINATION $= {CMAKE_INSTALL_FULL_LIBDIR}) > endif(WIN32) > > install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pcap/ DESTINATION include/= pcap) > install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap.h DESTINATION include) > +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-bpf.h DESTINATION include= ) > +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-namedb.h DESTINATION incl= ude) > > # On UN*X, and on Windows when not using MSVC, generate libpcap.pc and > # pcap-config and process man pages and arrange that they be installed. > @@ -2223,8 +2393,8 @@ if(NOT MSVC) > foreach(LIB ${PCAP_LINK_LIBRARIES}) > set(LIBS "${LIBS} -l${LIB}") > endforeach(LIB) > - configure_file(${CMAKE_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BI= NARY_DIR}/pcap-config @ONLY) > - configure_file(${CMAKE_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BIN= ARY_DIR}/libpcap.pc @ONLY) > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CU= RRENT_BINARY_DIR}/pcap-config @ONLY) > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CUR= RENT_BINARY_DIR}/libpcap.pc @ONLY) > install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION= bin) > install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib= /pkgconfig) > > @@ -2236,17 +2406,17 @@ if(NOT MSVC) > # > set(MAN1 "") > foreach(MANPAGE ${MAN1_NOEXPAND}) > - set(MAN1 ${MAN1} ${CMAKE_SOURCE_DIR}/${MANPAGE}) > + set(MAN1 ${MAN1} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE}) > endforeach(MANPAGE) > install(FILES ${MAN1} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) > > set(MAN3PCAP "") > foreach(MANPAGE ${MAN3PCAP_NOEXPAND}) > - set(MAN3PCAP ${MAN3PCAP} ${CMAKE_SOURCE_DIR}/${MANPAGE}) > + set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE}) > endforeach(MANPAGE) > foreach(TEMPLATE_MANPAGE ${MAN3PCAP_EXPAND}) > string(REPLACE ".in" "" MANPAGE ${TEMPLATE_MANPAGE}) > - configure_file(${CMAKE_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_C= URRENT_BINARY_DIR}/${MANPAGE} @ONLY) > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} $= {CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY) > set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE}) > endforeach(TEMPLATE_MANPAGE) > install(FILES ${MAN3PCAP} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) > @@ -2270,7 +2440,7 @@ if(NOT MSVC) > set(MANFILE "") > foreach(TEMPLATE_MANPAGE ${MANFILE_EXPAND}) > string(REPLACE ".manfile.in" ".${MAN_FILE_FORMATS}" MANPAGE ${TE= MPLATE_MANPAGE}) > - configure_file(${CMAKE_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_C= URRENT_BINARY_DIR}/${MANPAGE} @ONLY) > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} $= {CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY) > set(MANFILE ${MANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE}) > endforeach(TEMPLATE_MANPAGE) > install(FILES ${MANFILE} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MA= N_FILE_FORMATS}) > @@ -2278,7 +2448,7 @@ if(NOT MSVC) > set(MANMISC "") > foreach(TEMPLATE_MANPAGE ${MANMISC_EXPAND}) > string(REPLACE ".manmisc.in" ".${MAN_MISC_INFO}" MANPAGE ${TEMPL= ATE_MANPAGE}) > - configure_file(${CMAKE_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_C= URRENT_BINARY_DIR}/${MANPAGE} @ONLY) > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} $= {CMAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY) > set(MANMISC ${MANMISC} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE}) > endforeach(TEMPLATE_MANPAGE) > install(FILES ${MANMISC} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MA= N_MISC_INFO}) > > Copied: head/contrib/libpcap/CONTRIBUTING.md (from r353141, vendor/libpca= p/dist/CONTRIBUTING.md) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/contrib/libpcap/CONTRIBUTING.md Sat Dec 21 21:01:03 2019 = (r355988, copy of r353141, vendor/libpcap/dist/CONTRIBUTING.md) > @@ -0,0 +1,29 @@ > +Guidelines for contributing > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > + > +To report a security issue (segfault, buffer overflow, infinite loop, ar= bitrary > +code execution etc) please send an e-mail to security@tcpdump.org, do no= t use > +the bug tracker! > + > +To report a non-security problem (failure to compile, failure to capture= packets > +properly, missing support for a network interface type or DLT) please ch= eck > +first that it reproduces with the latest stable release of libpcap. If i= t does, > +please check that the problem reproduces with the current git master bra= nch of > +libpcap. If it does (and it is not a security-related problem, otherwise= see > +above), please navigate to https://github.com/the-tcpdump-group/libpcap/= issues > +and check if the problem has already been reported. If it has not, pleas= e open > +a new issue and provide the following details: > + > +* libpcap version (e.g. from tcpdump --version) > +* operating system name and version and any other details that may be re= levant > + (uname -a, compiler name and version, CPU type etc.) > +* configure flags if any were used > +* statement of the problem > +* steps to reproduce > + > +Please note that if you know exactly how to solve the problem and the so= lution > +would not be too intrusive, it would be best to contribute some developm= ent time > +and open a pull request instead. > + > +Still not sure how to do? Feel free to [subscribe](https://www.tcpdump.o= rg/#mailing-lists) > +to the mailing list tcpdump-workers@lists.tcpdump.org and ask! > > Modified: head/contrib/libpcap/CREDITS > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/libpcap/CREDITS Sat Dec 21 19:23:33 2019 (= r355987) > +++ head/contrib/libpcap/CREDITS Sat Dec 21 21:01:03 2019 (= r355988) > @@ -1,21 +1,18 @@ > -This file lists people who have contributed to libpcap: > +This file lists people who have contributed to libpcap. > > -The current maintainers: > - Bill Fenner > +The current maintainers (in alphabetical order): > Denis Ovsienko > - Fulvio Risso > + Francois-Xavier Le Bail > Guy Harris > - Hannes Gredler > Michael Richardson > - Francois-Xavier Le Bail > > -Additional people who have contributed patches: > - > +Additional people who have contributed patches (in alphabetical order): > Akos Vandra > Alan Bawden > Albert Chin > Alexander 'Leo' Bergolth > Alexey Kuznetsov > + Ali Abdulkadir > Alon Bar-Lev > Andres Perera > Andrew Brown > @@ -62,6 +59,7 @@ Additional people who have contributed patches: > Gabor Tatarka > Garrett Cooper > George Neville-Neil > + Gerard Garcia > Gianluca Varenni > Gilbert Hoyek > Gisle Vanem > @@ -99,6 +97,7 @@ Additional people who have contributed patches: > Koryn Grant > Kris Katterjohn > Krzysztof Halasa > + Lennert Buytenhek > Lorenzo Cavallaro > Loris Degioanni > Love H=C3=B6rnquist-=C3=85strand > @@ -114,6 +113,7 @@ Additional people who have contributed patches: > M=C3=A1rton N=C3=A9meth > Matthew Luckie > Max Laier > + Michal Kubecek > Michal Labedzki > Michal Sekletar > Mike Frysinger > @@ -129,7 +129,7 @@ Additional people who have contributed patches: > Olaf Kirch > Ollie Wild > Onno van der Linden > - Paolo Abeni > + Paolo Abeni > Patrick Marie > Patrick McHardy > Paul Mundt > @@ -145,6 +145,8 @@ Additional people who have contributed patches: > Rick Jones > Robert Edmonds > Roberto Mariani > + Rongxi Li > + Roland Dreier > Romain Francoise > Sagun Shakya > Scott Barron > @@ -167,6 +169,7 @@ Additional people who have contributed patches: > Wesley Shields > Xianjie Zhang > Xin Li > + Xue Jiang Qing > Yen Yen Lim > Yoann Vandoorselaere > Yvan Vanhullebus > @@ -176,5 +179,8 @@ The original LBL crew: > Craig Leres > Van Jacobson > > -Past maintainers: > - Jun-ichiro itojun Hagino = Also see: http://www.wide.ad.jp/itojun-award/ > +Past maintainers (in alphabetical order): > + Bill Fenner > + Fulvio Risso > + Hannes Gredler > + Jun-ichiro itojun Hagino A= lso see: http://www.wide.ad.jp/itojun-award/ > > Copied: head/contrib/libpcap/INSTALL.md (from r353141, vendor/libpcap/dis= t/INSTALL.md) > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/contrib/libpcap/INSTALL.md Sat Dec 21 21:01:03 2019 (= r355988, copy of r353141, vendor/libpcap/dist/INSTALL.md) > @@ -0,0 +1,352 @@ > +To build libpcap, run "./configure" (a shell script). The configure > +script will determine your system attributes and generate an > +appropriate Makefile from Makefile.in. Next run "make". If everything > +goes well you can su to root and run "make install". However, you need > +not install libpcap if you just want to build tcpdump; just make sure > +the tcpdump and libpcap directory trees have the same parent > +directory. > + > +If configure says: > + > + configure: warning: cannot determine packet capture interface > + configure: warning: (see INSTALL for more info) > + > +then your system either does not support packet capture or your system > +does support packet capture but libpcap does not support that > +particular type. (If you have HP-UX, see below.) If your system uses a > +packet capture not supported by libpcap, please send us patches; don't > +forget to include an autoconf fragment suitable for use in > +configure.ac. > + > +It is possible to override the default packet capture type, although > +the circumstance where this works are limited. For example if you have > +installed bpf under SunOS 4 and wish to build a snit libpcap: > + > + ./configure --with-pcap=3Dsnit > + > +Another example is to force a supported packet capture type in the case > +where the configure scripts fails to detect it. > + > +You will need an ANSI C compiler to build libpcap. The configure script > +will abort if your compiler is not ANSI compliant. If this happens, use > +the generally available GNU C compiler (GCC). > + > +You will need either Flex 2.5.31 or later, or a version of Lex > +compatible with it (if any exist), to build libpcap. The configure > +script will abort if there isn't any such program. If you have an older > +version of Flex, or don't have a compatible version of Lex, the current > +version of flex is available at flex.sourceforge.net. > + > +You will need either Bison, Berkeley YACC, or a version of YACC > +compatible with them (if any exist), to build libpcap. The configure > +script will abort if there isn't any such program. If you don't have > +any such program, the current version of Bison can be found at > +http://ftp.gnu.org/gnu/bison/ and the current version of Berkeley YACC > +can be found at http://invisible-island.net/byacc/. > + > +Sometimes the stock C compiler does not interact well with Flex and > +Bison. The list of problems includes undefined references for alloca. > +You can get around this by installing GCC. > + > +If you use Solaris, there is a bug with bufmod(7) that is fixed in > +Solaris 2.3.2 (aka SunOS 5.3.2). Setting a snapshot length with the > +broken bufmod(7) results in data be truncated from the FRONT of the > +packet instead of the end. The work around is to not set a snapshot > +length but this results in performance problems since the entire packet > +is copied to user space. If you must run an older version of Solaris, > +there is a patch available from Sun; ask for bugid 1149065. After > +installing the patch, use "setenv BUFMOD_FIXED" to enable use of > +bufmod(7). However, we recommend you run a more current release of > +Solaris. > + > +If you use the SPARCompiler, you must be careful to not use the > +/usr/ucb/cc interface. If you do, you will get bogus warnings and > +perhaps errors. Either make sure your path has /opt/SUNWspro/bin > +before /usr/ucb or else: > + > + setenv CC /opt/SUNWspro/bin/cc > + > +before running configure. (You might have to do a "make distclean" > +if you already ran configure once). > + > +If you are trying to do packet capture with a FORE ATM card, you may or > +may not be able to. They usually only release their driver in object > +code so unless their driver supports packet capture, there's not much > +libpcap can do. > + > +If you get an error like: > + > + tcpdump: recv_ack: bind error 0x??? > + > +when using DLPI, look for the DL_ERROR_ACK error return values, usually > +in /usr/include/sys/dlpi.h, and find the corresponding value. > + > +Under {DEC OSF/1, Digital UNIX, Tru64 UNIX}, packet capture must be > +enabled before it can be used. For instructions on how to enable packet > +filter support, see: > + > + ftp://ftp.digital.com/pub/Digital/dec-faq/Digital-UNIX > + > +Look for the "How do I configure the Berkeley Packet Filter and capture > +tcpdump traces?" item. > + > +Once you enable packet filter support, your OSF system will support bpf > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-freebsd-mips@freebsd.org Mon May 4 20:08:55 2020 Return-Path: Delivered-To: freebsd-mips@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7E5C32C19C0; Mon, 4 May 2020 20:08:55 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49GDT24tnjz3Fff; Mon, 4 May 2020 20:08:54 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qk1-f194.google.com with SMTP id b6so886898qkh.11; Mon, 04 May 2020 13:08:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ILxGCw83dGaFy48T2ccrEhVTHH2QXX0Zu6q3y6byNrc=; b=QdXFXnMZerWXuZOo9IaTNnL6n3SbQ2f/mM9qrBGHkOXgpcnMO7h27XDG4GxckS/hrs aux2CBOteicqtxG3p1gs5BhbEN3/PiC1Y/lyb4TTrDfrI39vsoqRTbZeiPnbiD0ZvjRn 5GlC+4IDE51t1OEGl6tujhOf5f4K81c2rGbW32zn91TSd9n0djyowVHsbYO6V8V4zB2g qYCl/AKZvwu92Cje8/DokvtsTaUsq5ZVbKLbY6Pn5EeQHqslq4CBeH/prXds7WVaPX79 zi3VaIm5e8pXxzmz+fcBscFAeydpT798hCLyOzcg1u/iyoBrPAyNzXr0QsYd4t9EpjrI dDhA== X-Gm-Message-State: AGi0PuY1q7ivrgR6RltigBWyZmBT7uRHn4sHNSYnX5BwrzvmpvVLT62t /Inb2CDjKKs3QbJeZIscZR30bSiesGme/xhzVF9bu56l X-Google-Smtp-Source: APiQypLBJmEYIFlttTflpichMKox2aWL0ANr5xIY+hYstDNCRPEz+2Dsf5E65P992XglaWx5CLPzs0N0rGNMGfSQj8M= X-Received: by 2002:a05:620a:7e8:: with SMTP id k8mr45999qkk.183.1588622932502; Mon, 04 May 2020 13:08:52 -0700 (PDT) MIME-Version: 1.0 References: <201912212101.xBLL14sr033938@repo.freebsd.org> In-Reply-To: From: Adrian Chadd Date: Mon, 4 May 2020 13:08:40 -0700 Message-ID: Subject: Re: svn commit: r355988 - in head: contrib/libpcap contrib/libpcap/cmake/Modules contrib/libpcap/doc contrib/libpcap/missing contrib/libpcap/msdos contrib/libpcap/pcap contrib/libpcap/rpcapd contrib/li... To: Cy Schubert , "freebsd-mips@freebsd.org" , freebsd-wireless Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49GDT24tnjz3Fff X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 209.85.222.194 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-2.17 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; DMARC_NA(0.00)[freebsd.org]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE(-0.18)[ip: (-0.01), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; RCVD_IN_DNSWL_NONE(0.00)[194.222.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_MEDIUM(-0.99)[-0.993,0]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[194.222.85.209.rep.mailspike.net : 127.0.0.17]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2020 20:08:55 -0000 On Mon, 4 May 2020 at 12:54, Adrian Chadd wrote: > > hi, > > This commit /seems/ to have broken things on FreeBSD-HEAD on mips74k. > I haven't yet tried hostapd mode on x86 with this commit; I"ll do that > soon. > > The TL;DR: > > * hostapd + wpa encryption + mips32 (mips74k in this instance) fails > on -HEAD! Woo! > > * l2_packet_freebsd.c in hostapd uses a pcap filter to filter out > eapol frames from other parties to the eapol/raw receive socket; > * the filter compilation causes an unaligned access on mips, which i > /thought/ we handled correctly, but apparently not; > * the filter as written in hostapd doesn't result in anything being received. > > The unaligned warn is: > > Unaligned Load Word: pid=426 (tcpdump), tid=100040, pc=0x40569034, > badvaddr=0x4051d02a > > (I dno't yet have the line of code, that's next too.) > > The filter is: > > *** Filter is "not ether src c4:6e:1f:5b:04:f7 and ( ether dst > c4:6e:1f:5b:04:f7 or ether dst 01:80:c2:00:00:03 ) and ether proto > 0x888e" > > I'll dig into the details some more soon. > Here's an example EAPOL exchange with a minimal filter: # tcpdump -l -ni wlan0 -y IEEE802_11_RADIO -vvvv -eeee "(ether proto 0x888e)" tcpdump: data link type IEEE802_11_RADIO tcpdump: listening on wlan0, link-type IEEE802_11_RADIO (802.11 plus radiotap header), capture size 262144 bytes 19:58:39.880399 1.0 Mb/s 60dBm tx power antenna 0 2412 MHz 11g ht/20 0us DA:00:03:7f:40:82:1a BSSID:c4:6e:1f:5b:04:f7 SA:c4:6e:1f:5b:04:f7 LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Ethernet (0x000000), ethertype EAPOL (0x888e), length 99: EAPOL key (3) v2, len 95 19:58:39.885193 846271791us tsft 1.0 Mb/s -29dBm signal -96dBm noise antenna 1 2412 MHz 11g 314us BSSID:c4:6e:1f:5b:04:f7 SA:00:03:7f:40:82:1a DA:c4:6e:1f:5b:04:f7 LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Ethernet (0x000000), ethertype EAPOL (0x888e), length 121: EAPOL key (3) v1, len 117 19:58:39.886907 1.0 Mb/s 60dBm tx power antenna 0 2412 MHz 11g ht/20 0us DA:00:03:7f:40:82:1a BSSID:c4:6e:1f:5b:04:f7 SA:c4:6e:1f:5b:04:f7 LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Ethernet (0x000000), ethertype EAPOL (0x888e), length 203: EAPOL key (3) v2, len 199 19:58:39.892254 846278862us tsft 1.0 Mb/s -32dBm signal -96dBm noise antenna 1 2412 MHz 11g 314us BSSID:c4:6e:1f:5b:04:f7 SA:00:03:7f:40:82:1a DA:c4:6e:1f:5b:04:f7 LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Ethernet (0x000000), ethertype EAPOL (0x888e), length 99: EAPOL key (3) v1, len 95 Note it's between 00:03:7f:40:82:1a (the STA) and c4:6e:1f:5b:04:f7 (the AP). If I add the ether dst clause - either half - I get nothing. Any ideas? :) I can chop the filter down to EAPOL only for now to save on AP CPU but I'd love to get to the root cause and fix it in -HEAD and -12. Thanks! -adrian > Thanks, > > > > -adrian > > > On Sat, 21 Dec 2019 at 13:01, Cy Schubert wrote: > > > > Author: cy > > Date: Sat Dec 21 21:01:03 2019 > > New Revision: 355988 > > URL: https://svnweb.freebsd.org/changeset/base/355988 > > > > Log: > > MFV r353141 (by phillip): > > > > Update libpcap from 1.9.0 to 1.9.1. > > > > MFC after: 2 weeks From owner-freebsd-mips@freebsd.org Mon May 4 20:12:58 2020 Return-Path: Delivered-To: freebsd-mips@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A65D2C1C01; Mon, 4 May 2020 20:12:58 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49GDYj45WBz3FyN; Mon, 4 May 2020 20:12:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id VhSPjpKHpng7KVhSQjznM7; Mon, 04 May 2020 14:12:55 -0600 X-Authority-Analysis: v=2.3 cv=ecemg4MH c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=sTwFKg_x9MkA:10 a=XldT38RWNwACPDQzwzUA:9 a=YcVvoE94AAAA:8 a=6I5d2MoRAAAA:8 a=Gd19OaLnAAAA:8 a=l70xHGcnAAAA:8 a=GUVi8RmzAAAA:8 a=RwghQLH8AAAA:8 a=B3051LIPAAAA:20 a=nM-U5c2sAAAA:8 a=FP58Ms26AAAA:8 a=mDV3o1hIAAAA:8 a=HiWkEfo4AAAA:8 a=muxQsGLAAAAA:8 a=AO5TcMi5IkT2ZK8ZjFkA:9 a=QB6Ow4JZtMuvnkr_:21 a=Ormk25zfWlvxadRj:21 a=Xw6OzUqeFYtPgw-4:21 a=wPNLvfGTeEIA:10 a=8xPuELMIaLgA:10 a=NBWPt7yFRtvYKvQRiAgA:9 a=De_Ol2h6w80A:10 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=ics_IjAVWSmO8OVX31YA:9 a=BOg4e644cxQA:10 a=b0VhcQ1YOeLJKHyHvj2K:22 a=IjZwj45LgO3ly-622nXo:22 a=A7ar-Dco5atk_noSHKP4:22 a=JtN_ecm89k2WOvw5-HMO:22 a=jSdgSmmMQx7r16_JUfbt:22 a=n9nybW_iuiH3Rhfh8WpK:22 a=0F3kFG8XAy-VeAFno-2a:22 a=_FVE-zBwftR9WsbkzFJk:22 a=_QplDg0m8TGAdENQf2wZ:22 a=h8UILHB48zi8jqi5P-4Q:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=aQB-7fWqU5LqMcO3KFvk:22 a=p-dnK0njbqwfn1k4-x12:22 a=rLkV7i5x5X597yo9dRWc:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 51E95D79; Mon, 4 May 2020 13:12:52 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 044KCqVW002691; Mon, 4 May 2020 13:12:52 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 044KCpa4002687; Mon, 4 May 2020 13:12:51 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202005042012.044KCpa4002687@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Adrian Chadd cc: Cy Schubert , "freebsd-mips@freebsd.org" , freebsd-wireless Subject: Re: svn commit: r355988 - in head: contrib/libpcap contrib/libpcap/cmake/Modules contrib/libpcap/doc contrib/libpcap/missing contrib/libpcap/msdos contrib/libpcap/pcap contrib/libpcap/rpcapd contrib/li... In-reply-to: References: <201912212101.xBLL14sr033938@repo.freebsd.org> Comments: In-reply-to Adrian Chadd message dated "Mon, 04 May 2020 12:54:27 -0700." Mime-Version: 1.0 Content-Type: multipart/mixed ; boundary="==_Exmh_1588623126_39090" Date: Mon, 04 May 2020 13:12:51 -0700 X-CMAE-Envelope: MS4wfPZ42q9caIyFHpe0HD6bN/eHVoN4Vz7YFapM1A38dPnkIOc/JONHFOHbDWYubRxGvqvoa58cjDCiXkZQuiJHtJsgjg2Vjap3MAp/1jdzVQCVskNUtVM2 /RwLNoDiAwRM1Wy1xf7AM5UvQA9tP1H0C7u8PYJVxW2eiFWAqsdBEbaPnF6p1urCNSv0T5WpY7eZvcl8Cm5eyAFjSkK7nnAtUJibW5rVtNWNEqHyzL0NezMi QcctbAv4G1O8POrA1Ngqdodojo7Vrle00CNvsT37NexnaCpHn80FQVkGUzZ2NeIN X-Rspamd-Queue-Id: 49GDYj45WBz3FyN X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2020 20:12:58 -0000 This is a multipart MIME message. --==_Exmh_1588623126_39090 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Adrian, Looking at our upstream's git repo, can you try the attached patch? Their commit log message says: commit 23763c6516cdab2da822101a5aebd6af36122c85 Author: Yi Zhu Date: Thu Dec 9 11:30:20 2010 -0800 bsd: Fix receive buffer alignment issue wpa_supplicant seems to crash from time to time on a NetBSD 4.0 MIPS platform. The root cause turned out to be a MIPS alignment issue. In my wpa_supplicant crash case, in function wpa_driver_bsd_event_receive (from driver_bsd.c), the buf[2048] address is started from i.e. 0x7fffd546, which is not 4 bytes aligned. Later when it is casted to (struct if_msghdr *), and rtm->rtm_flags is used. rtm->rtm_flags is "int" type, but its address is not 4 bytes aligned. This is because the start address of rtm is not 4 bytes aligned. Unfortunately in NetBSD MIPS kernel (unlike Linux MIPS kernel emulates unaligned access in its exception handler), the default behavior is to generate a memory fault to the application that accesses unaligned memory address. Thus comes the early mentioned wpa_supplicant crash. An interesting note is when I'm using the wpa_supplicant version 0.4.9, I never saw this problem. Maybe the stack layout is different. But I didn't look into details. I used below patch to resolve this problem. Now it runs correctly for at least several hours. But you might have a better fix (maybe we can use malloc/free so that it is at least cache line aligned?). I'm also not sure if other drivers should have the same problem. Let me know if this fixes your problem. In message , Adrian Chadd writes: > hi, > > This commit /seems/ to have broken things on FreeBSD-HEAD on mips74k. > I haven't yet tried hostapd mode on x86 with this commit; I"ll do that > soon. > > The TL;DR: > > * hostapd + wpa encryption + mips32 (mips74k in this instance) fails > on -HEAD! Woo! > > * l2_packet_freebsd.c in hostapd uses a pcap filter to filter out > eapol frames from other parties to the eapol/raw receive socket; > * the filter compilation causes an unaligned access on mips, which i > /thought/ we handled correctly, but apparently not; > * the filter as written in hostapd doesn't result in anything being received. > > The unaligned warn is: > > Unaligned Load Word: pid=426 (tcpdump), tid=100040, pc=0x40569034, > badvaddr=0x4051d02a > > (I dno't yet have the line of code, that's next too.) > > The filter is: > > *** Filter is "not ether src c4:6e:1f:5b:04:f7 and ( ether dst > c4:6e:1f:5b:04:f7 or ether dst 01:80:c2:00:00:03 ) and ether proto > 0x888e" > > I'll dig into the details some more soon. > > Thanks, > > > > -adrian > > > On Sat, 21 Dec 2019 at 13:01, Cy Schubert wrote: > > > > Author: cy > > Date: Sat Dec 21 21:01:03 2019 > > New Revision: 355988 > > URL: https://svnweb.freebsd.org/changeset/base/355988 > > > > Log: > > MFV r353141 (by phillip): > > > > Update libpcap from 1.9.0 to 1.9.1. > > > > MFC after: 2 weeks > > > > Added: > > head/contrib/libpcap/CONTRIBUTING.md > > - copied unchanged from r353141, vendor/libpcap/dist/CONTRIBUTING.md > > head/contrib/libpcap/INSTALL.md > > - copied unchanged from r353141, vendor/libpcap/dist/INSTALL.md > > head/contrib/libpcap/README.md > > - copied unchanged from r353141, vendor/libpcap/dist/README.md > > head/contrib/libpcap/doc/ > > - copied from r353141, vendor/libpcap/dist/doc/ > > head/contrib/libpcap/missing/asprintf.c > > - copied unchanged from r353141, vendor/libpcap/dist/missing/asprintf. > c > > head/contrib/libpcap/missing/strlcat.c > > - copied unchanged from r353141, vendor/libpcap/dist/missing/strlcat.c > > head/contrib/libpcap/missing/strlcpy.c > > - copied unchanged from r353141, vendor/libpcap/dist/missing/strlcpy.c > > head/contrib/libpcap/missing/win_asprintf.c > > - copied unchanged from r353141, vendor/libpcap/dist/missing/win_aspri > ntf.c > > head/contrib/libpcap/pcap/socket.h > > - copied unchanged from r353141, vendor/libpcap/dist/pcap/socket.h > > head/contrib/libpcap/pcap_set_immediate_mode.3pcap.in > > - copied unchanged from r353141, vendor/libpcap/dist/pcap_set_immediat > e_mode.3pcap.in > > head/contrib/libpcap/pcap_set_protocol_linux.3pcap > > - copied unchanged from r353141, vendor/libpcap/dist/pcap_set_protocol > _linux.3pcap > > head/contrib/libpcap/rpcapd/ > > - copied from r353141, vendor/libpcap/dist/rpcapd/ > > head/contrib/libpcap/testprogs/ > > - copied from r353141, vendor/libpcap/dist/testprogs/ > > Deleted: > > head/contrib/libpcap/CONTRIBUTING > > head/contrib/libpcap/INSTALL.txt > > head/contrib/libpcap/README > > head/contrib/libpcap/README.Win32 > > head/contrib/libpcap/README.aix > > head/contrib/libpcap/README.dag > > head/contrib/libpcap/README.hpux > > head/contrib/libpcap/README.linux > > head/contrib/libpcap/README.macos > > head/contrib/libpcap/README.septel > > head/contrib/libpcap/README.sita > > head/contrib/libpcap/README.tru64 > > head/contrib/libpcap/cmake/Modules/FindPthreads-w32.cmake > > head/contrib/libpcap/pcap_set_immediate_mode.3pcap > > head/contrib/libpcap/pcap_set_protocol.3pcap > > Modified: > > head/contrib/libpcap/CHANGES > > head/contrib/libpcap/CMakeLists.txt > > head/contrib/libpcap/CREDITS > > head/contrib/libpcap/Makefile.in > > head/contrib/libpcap/VERSION > > head/contrib/libpcap/aclocal.m4 > > head/contrib/libpcap/bpf_filter.c > > head/contrib/libpcap/cmake/Modules/FindPacket.cmake > > head/contrib/libpcap/cmakeconfig.h.in > > head/contrib/libpcap/config.guess > > head/contrib/libpcap/config.h.in > > head/contrib/libpcap/config.sub > > head/contrib/libpcap/configure > > head/contrib/libpcap/configure.ac > > head/contrib/libpcap/diag-control.h > > head/contrib/libpcap/fmtutils.c > > head/contrib/libpcap/fmtutils.h > > head/contrib/libpcap/ftmacros.h > > head/contrib/libpcap/gencode.c > > head/contrib/libpcap/gencode.h > > head/contrib/libpcap/grammar.y > > head/contrib/libpcap/missing/snprintf.c > > head/contrib/libpcap/missing/win_snprintf.c > > head/contrib/libpcap/msdos/readme.dos > > head/contrib/libpcap/nametoaddr.c > > head/contrib/libpcap/optimize.c > > head/contrib/libpcap/pcap-bpf.c > > head/contrib/libpcap/pcap-bt-linux.c > > head/contrib/libpcap/pcap-bt-monitor-linux.c > > head/contrib/libpcap/pcap-common.c > > head/contrib/libpcap/pcap-common.h > > head/contrib/libpcap/pcap-dag.c > > head/contrib/libpcap/pcap-dlpi.c > > head/contrib/libpcap/pcap-dos.c > > head/contrib/libpcap/pcap-filter.manmisc.in > > head/contrib/libpcap/pcap-int.h > > head/contrib/libpcap/pcap-libdlpi.c > > head/contrib/libpcap/pcap-linktype.manmisc.in > > head/contrib/libpcap/pcap-linux.c > > head/contrib/libpcap/pcap-netfilter-linux.c > > head/contrib/libpcap/pcap-netmap.c > > head/contrib/libpcap/pcap-new.c > > head/contrib/libpcap/pcap-npf.c > > head/contrib/libpcap/pcap-null.c > > head/contrib/libpcap/pcap-rpcap.c > > head/contrib/libpcap/pcap-rpcap.h > > head/contrib/libpcap/pcap-savefile.manfile.in > > head/contrib/libpcap/pcap-septel.c > > head/contrib/libpcap/pcap-sita.c > > head/contrib/libpcap/pcap-sita.html > > head/contrib/libpcap/pcap-snf.c > > head/contrib/libpcap/pcap-tc.c > > head/contrib/libpcap/pcap-tstamp.manmisc.in > > head/contrib/libpcap/pcap-usb-linux.c > > head/contrib/libpcap/pcap.3pcap.in > > head/contrib/libpcap/pcap.c > > head/contrib/libpcap/pcap/bpf.h > > head/contrib/libpcap/pcap/compiler-tests.h > > head/contrib/libpcap/pcap/dlt.h > > head/contrib/libpcap/pcap/funcattrs.h > > head/contrib/libpcap/pcap/nflog.h > > head/contrib/libpcap/pcap/pcap-inttypes.h > > head/contrib/libpcap/pcap/pcap.h > > head/contrib/libpcap/pcap/sll.h > > head/contrib/libpcap/pcap_activate.3pcap > > head/contrib/libpcap/pcap_breakloop.3pcap > > head/contrib/libpcap/pcap_can_set_rfmon.3pcap > > head/contrib/libpcap/pcap_compile.3pcap.in > > head/contrib/libpcap/pcap_create.3pcap > > head/contrib/libpcap/pcap_datalink.3pcap.in > > head/contrib/libpcap/pcap_datalink_name_to_val.3pcap > > head/contrib/libpcap/pcap_datalink_val_to_name.3pcap > > head/contrib/libpcap/pcap_dump.3pcap > > head/contrib/libpcap/pcap_dump_file.3pcap > > head/contrib/libpcap/pcap_dump_flush.3pcap > > head/contrib/libpcap/pcap_dump_ftell.3pcap > > head/contrib/libpcap/pcap_dump_open.3pcap.in > > head/contrib/libpcap/pcap_file.3pcap > > head/contrib/libpcap/pcap_fileno.3pcap > > head/contrib/libpcap/pcap_findalldevs.3pcap > > head/contrib/libpcap/pcap_freecode.3pcap > > head/contrib/libpcap/pcap_get_required_select_timeout.3pcap > > head/contrib/libpcap/pcap_get_selectable_fd.3pcap > > head/contrib/libpcap/pcap_get_tstamp_precision.3pcap.in > > head/contrib/libpcap/pcap_geterr.3pcap > > head/contrib/libpcap/pcap_inject.3pcap > > head/contrib/libpcap/pcap_is_swapped.3pcap > > head/contrib/libpcap/pcap_list_datalinks.3pcap.in > > head/contrib/libpcap/pcap_list_tstamp_types.3pcap.in > > head/contrib/libpcap/pcap_lookupdev.3pcap > > head/contrib/libpcap/pcap_lookupnet.3pcap > > head/contrib/libpcap/pcap_loop.3pcap > > head/contrib/libpcap/pcap_major_version.3pcap > > head/contrib/libpcap/pcap_next_ex.3pcap > > head/contrib/libpcap/pcap_offline_filter.3pcap > > head/contrib/libpcap/pcap_open_dead.3pcap.in > > head/contrib/libpcap/pcap_open_live.3pcap > > head/contrib/libpcap/pcap_open_offline.3pcap.in > > head/contrib/libpcap/pcap_set_datalink.3pcap > > head/contrib/libpcap/pcap_set_timeout.3pcap > > head/contrib/libpcap/pcap_set_tstamp_precision.3pcap.in > > head/contrib/libpcap/pcap_set_tstamp_type.3pcap.in > > head/contrib/libpcap/pcap_setdirection.3pcap > > head/contrib/libpcap/pcap_setfilter.3pcap > > head/contrib/libpcap/pcap_setnonblock.3pcap > > head/contrib/libpcap/pcap_snapshot.3pcap > > head/contrib/libpcap/pcap_stats.3pcap > > head/contrib/libpcap/pcap_strerror.3pcap > > head/contrib/libpcap/pcap_tstamp_type_name_to_val.3pcap > > head/contrib/libpcap/pcap_tstamp_type_val_to_name.3pcap > > head/contrib/libpcap/portability.h > > head/contrib/libpcap/rpcap-protocol.h > > head/contrib/libpcap/savefile.c > > head/contrib/libpcap/scanner.l > > head/contrib/libpcap/sf-pcap.c > > head/contrib/libpcap/sf-pcap.h > > head/contrib/libpcap/sf-pcapng.c > > head/contrib/libpcap/sf-pcapng.h > > head/contrib/libpcap/sockutils.c > > head/contrib/libpcap/sockutils.h > > head/lib/libpcap/Makefile > > head/lib/libpcap/config.h > > head/sys/net/dlt.h > > Directory Properties: > > head/contrib/libpcap/ (props changed) > > > > Modified: head/contrib/libpcap/CHANGES > > =========================================================================== > === > > --- head/contrib/libpcap/CHANGES Sat Dec 21 19:23:33 2019 (r3 > 55987) > > +++ head/contrib/libpcap/CHANGES Sat Dec 21 21:01:03 2019 (r3 > 55988) > > @@ -1,5 +1,129 @@ > > -Wednesday, Jan. 25, 2017 guy@alum.mit.edu > > +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, C > VE-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 > > 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 change > s, 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 spe > cific 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 pre > sent > > + 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 su > pport. > > + 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 settin > g. > > + Explicitly warn that negative packet buffer timeouts should not be use > d. > > + rpcapd: Add support inetd-likes, including xinetd.conf, and systemd un > its > > + 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 > > > > Modified: head/contrib/libpcap/CMakeLists.txt > > =========================================================================== > === > > --- head/contrib/libpcap/CMakeLists.txt Sat Dec 21 19:23:33 2019 (r3 > 55987) > > +++ head/contrib/libpcap/CMakeLists.txt Sat Dec 21 21:01:03 2019 (r3 > 55988) > > @@ -9,7 +9,7 @@ if(POLICY CMP0042) > > 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 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") > > 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_VE > RSION}") > > - > > - 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_PATC > H_VERSION ${CMAKE_SYSTEM_VERSION}) > > - string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MINOR "${SYSTEM_MINO > R_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_RDMA "Disable RDMA sniffing support" OF > > 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 direct > ory with include and lib subdirectories for Septel API") > > +set(SEPTEL_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/../septel" CACHE PATH "Path t > o directory with include and lib subdirectories for Septel API") > > > > option(DISABLE_SNF "Disable Myricom SNF support" OFF) > > > > @@ -251,7 +174,7 @@ option(YYDEBUG "Build parser debugging code" OFF) > > > > # Get, parse, format and set pcap's version string from [pcap_root]/VERSIO > N > > # for later use. > > - > > + > > # Get MAJOR, MINOR, PATCH & SUFFIX > > file(STRINGS ${pcap_SOURCE_DIR}/VERSION > > PACKAGE_VERSION > > @@ -264,7 +187,7 @@ string(REGEX MATCH "^([0-9]+)" PACKAGE_VERSION_MAJOR " > > # Get MAJOR, MINOR & PATCH > > string(REGEX MATCH "^([0-9]+.)?([0-9]+.)?([0-9]+)" PACKAGE_VERSION_NOSUFFI > X "${PACKAGE_VERSION}") > > > > -if(WIN32) > > +if(WIN32) > > # Convert PCAP_VERSION_NOSUFFIX to Windows preferred version format > > string(REPLACE "." "," PACKAGE_VERSION_PREDLL ${PACKAGE_VERSION_NOSUFF > IX}) > > > > @@ -289,6 +212,7 @@ include_directories( > > > > include(CheckFunctionExists) > > include(CMakePushCheckState) > > +include(CheckSymbolExists) > > > > if(WIN32) > > > > @@ -310,6 +234,14 @@ if(WIN32) > > cmake_pop_check_state() > > endif(PACKET_FOUND) > > > > + message(STATUS "checking for Npcap's version.h") > > + check_symbol_exists(WINPCAP_PRODUCT_NAME "../../version.h" HAVE_VERSIO > N_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(CheckStructHasMember) > > 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 @@ endif(NOT WIN32) > > # > > 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 > > + > > +/* 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 @@ check_function_exists(strtok_r HAVE_STRTOK_R) > > # > > set(PCAP_LINK_LIBRARIES "") > > include(CheckLibraryExists) > > -include(CheckSymbolExists) > > if(WIN32) > > # > > # We need winsock2.h and ws2tcpip.h. > > @@ -865,11 +833,61 @@ set(PROJECT_SOURCE_LIST_C > > ) > > > > if(WIN32) > > - set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/win_snprint > f.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 implementati > on > > + # 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(); > > + # > > + # we have neither snprintf() nor vsnprintf(), and don't have > > + # asprintf() or vasprintf(), either. > > + # > > + # We assume that if we have asprintf() we have vasprintf(), as well > > + # as snprintf() and vsnprintf(), and that if we have snprintf() we > > + # have vsnprintf(). > > + # > > + # For the first case, we don't need any replacement routines. > > + # For the second case, we need replacement asprintf()/vasprintf() > > + # routines. > > + # For the third case, we need replacement snprintf()/vsnprintf() and > > + # asprintf()/vasprintf() routines. > > + # > > if(NOT HAVE_SNPRINTF) > > + # > > + # We assume we have none of them; missing/snprintf.c supplies > > + # all of them. > > + # > > set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/snprint > f.c) > > - endif(NOT HAVE_SNPRINTF) > > + elif(NOT HAVE_ASPRINTF) > > + # > > + # We assume we have snprintf()/vsnprintf() but lack > > + # asprintf()/vasprintf(); missing/asprintf.c supplies > > + # the latter (using vsnprintf()). > > + # > > + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/asprint > f.c) > > + endif() > > + if(NOT HAVE_STRLCAT) > > + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/strlcat > .c) > > + endif(NOT HAVE_STRLCAT) > > + if(NOT HAVE_STRLCPY) > > + set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/strlcpy > .c) > > + endif(NOT HAVE_STRLCPY) > > if(NOT HAVE_STRTOK_R) > > set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} missing/strtok_ > r.c) > > endif(NOT HAVE_STRTOK_R) > > @@ -931,13 +949,16 @@ else() > > # as it's a Linux, it should use packet sockets, > > # instead. > > # > > - # > > # We need: > > # > > # sys/types.h, because FreeBSD 10's net/bpf.h > > # requires that various BSD-style integer types > > # be defined; > > # > > + # sys/time.h, because AIX 5.2 and 5.3's net/bpf.h > > + # doesn't include it but does use struct timeval > > + # in ioctl definitions; > > + # > > # sys/ioctl.h and, if we have it, sys/ioccom.h, > > # because net/bpf.h defines ioctls; > > # > > @@ -952,9 +973,9 @@ else() > > # of those headers itself. > > # > > if(HAVE_SYS_IOCCOM_H) > > - check_symbol_exists(BIOCSETIF "sys/types.h;sys/ioctl.h;sys > /socket.h;sys/ioccom.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF) > > + check_symbol_exists(BIOCSETIF "sys/types.h;sys/time.h;sys/ > ioctl.h;sys/socket.h;sys/ioccom.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF > ) > > else(HAVE_SYS_IOCCOM_H) > > - check_symbol_exists(BIOCSETIF "sys/types.h;sys/ioctl.h;sys > /socket.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF) > > + check_symbol_exists(BIOCSETIF "sys/types.h;sys/time.h;sys/ > ioctl.h;sys/socket.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF) > > endif(HAVE_SYS_IOCCOM_H) > > endif(HAVE_NET_BPF_H) > > check_include_file(net/pfilt.h HAVE_NET_PFILT_H) > > @@ -1436,7 +1457,28 @@ if(NOT DISABLE_DBUS) > > set(PCAP_SUPPORT_DBUS TRUE) > > set(PROJECT_SOURCE_LIST_C ${PROJECT_SOURCE_LIST_C} pcap-dbus.c) > > include_directories(${DBUS_INCLUDE_DIRS}) > > - set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${DBUS_LIBRARIES}) > > + > > + # > > + # This "helpfully" supplies DBUS_LIBRARIES as a bunch of > > + # library names - not paths - and DBUS_LIBRARY_DIRS as > > + # a bunch of directories. > > + # > > + # CMake *really* doesn't like the notion of specifying "here are > > + # the directories in which to look for libraries" except in > > + # find_library() calls; it *really* prefers using full paths to > > + # library files, rather than library names. > > + # > > + # Find the libraries and add their full paths. > > + # > > + set(DBUS_LIBRARY_FULLPATHS) > > + foreach(_lib IN LISTS DBUS_LIBRARIES) > > + # > > + # Try to find this library, so we get its full path. > > + # > > + find_library(_libfullpath ${_lib} HINTS ${DBUS_LIBRARY_DIRS}) > > + list(APPEND DBUS_LIBRARY_FULLPATHS ${_libfullpath}) > > + endforeach() > > + set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${DBUS_LIBRARY_FULL > PATHS}) > > endif(DBUS_FOUND) > > endif(NOT DISABLE_DBUS) > > > > @@ -1499,7 +1541,7 @@ if(NOT DISABLE_DAG) > > endif() > > endif() > > endif() > > -endif() > > +endif() > > > > # Check for Septel card support. > > set(PROJECT_EXTERNAL_OBJECT_LIST "") > > @@ -1521,7 +1563,7 @@ if(NOT DISABLE_SEPTEL) > > set(PROJECT_EXTERNAL_OBJECT_LIST ${PROJECT_EXTERNAL_OBJECT_LIST} " > ${SEPTEL_ROOT}/asciibin.o ${SEPTEL_ROOT}/bit2byte.o ${SEPTEL_ROOT}/confirm.o > ${SEPTEL_ROOT}/fmtmsg.o ${SEPTEL_ROOT}/gct_unix.o ${SEPTEL_ROOT}/hqueue.o ${S > EPTEL_ROOT}/ident.o ${SEPTEL_ROOT}/mem.o ${SEPTEL_ROOT}/pack.o ${SEPTEL_ROOT} > /parse.o ${SEPTEL_ROOT}/pool.o ${SEPTEL_ROOT}/sdlsig.o ${SEPTEL_ROOT}/strtonu > m.o ${SEPTEL_ROOT}/timer.o ${SEPTEL_ROOT}/trace.o") > > set(HAVE_SEPTEL_API TRUE) > > endif() > > -endif() > > +endif() > > > > # Check for Myricom SNF support. > > if(NOT DISABLE_SNF) > > @@ -1542,7 +1584,7 @@ if(NOT DISABLE_SNF) > > set(HAVE_SNF_API TRUE) > > set(PCAP_LINK_LIBRARIES ${PCAP_LINK_LIBRARIES} ${SNF_LIBRARIES}) > > endif() > > -endif() > > +endif() > > > > # Check for Riverbed TurboCap support. > > if(NOT DISABLE_TC) > > @@ -1563,7 +1605,7 @@ if(NOT DISABLE_TC) > > set(HAVE_TC_API TRUE) > > set(PCAP_LINK_LIBRARIES "${PCAP_LINK_LIBRARIES} ${TC_LIBRARIES} ${ > CMAKE_USE_PTHREADS_INIT} stdc++") > > endif() > > -endif() > > +endif() > > > > # > > # Remote capture support. > > @@ -1582,7 +1624,7 @@ if(ENABLE_REMOTE) > > # the check. > > # > > cmake_push_check_state() > > - set(CMAKE_REQUIRED_INCLUDES ${CMAKE_SOURCE_DIR}) > > + set(CMAKE_REQUIRED_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}) > > check_struct_has_member("struct msghdr" msg_control "ftmacros.h;sys/so > cket.h" HAVE_STRUCT_MSGHDR_MSG_CONTROL) > > check_struct_has_member("struct msghdr" msg_flags "ftmacros.h;sys/sock > et.h" HAVE_STRUCT_MSGHDR_MSG_FLAGS) > > cmake_pop_check_state() > > @@ -1597,7 +1639,7 @@ endif(ENABLE_REMOTE) > > # > > # Check and add warning options if we have a .devel file. > > # > > -if(EXISTS ${CMAKE_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DIR}/.devel) > > +if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.devel OR EXISTS ${CMAKE_BINARY_DIR} > /.devel) > > # > > # Warning options. > > # > > @@ -1808,10 +1850,12 @@ set_source_files_properties(${CMAKE_CURRENT_BINARY_ > DIR > > > > # > > # Assume, by default, no support for shared libraries and V7/BSD > > -# convention for man pages (file formats in section 5, miscellaneous > > -# info in section 7, administrative commands and daemons in section 8). > > +# convention for man pages (devices in section 4, file formats in > > +# section 5, miscellaneous info in section 7, administrative commands > > +# and daemons in section 8). Individual cases can override this. > > # Individual cases can override this. > > # > > +set(MAN_DEVICES 4) > > set(MAN_FILE_FORMATS 5) > > set(MAN_MISC_INFO 7) > > set(MAN_ADMIN_COMMANDS 8) > > @@ -1869,6 +1913,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "OSF1") > > # > > set(MAN_FILE_FORMATS 4) > > set(MAN_MISC_INFO 5) > > + set(MAN_DEVICES 7) > > elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_SYSTEM_VERSION MATCHES > "5[.][0-9.]*") > > # > > # SunOS 5.x. > > @@ -1892,6 +1937,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS" AND CMAKE_S > Y > > set(MAN_ADMIN_COMMANDS 1m) > > set(MAN_FILE_FORMATS 4) > > set(MAN_MISC_INFO 5) > > + set(MAN_DEVICES 7D) > > endif() > > endif() > > > > @@ -1944,6 +1990,16 @@ if(BUILD_SHARED_LIBS) > > add_dependencies(${LIBRARY_NAME} SerializeTarget) > > set_target_properties(${LIBRARY_NAME} PROPERTIES > > COMPILE_DEFINITIONS BUILDING_PCAP) > > + # > > + # No matter what the library is called - it might be called "wpcap" > > + # in a Windows build - the symbol to define to indicate that we're > > + # building the library, rather than a program using the library, > > + # and thus that we're exporting functions defined in our public > > + # header files, rather than importing those functions, is > > + # pcap_EXPORTS. > > + # > > + set_target_properties(${LIBRARY_NAME} PROPERTIES > > + DEFINE_SYMBOL pcap_EXPORTS) > > endif(BUILD_SHARED_LIBS) > > > > add_library(${LIBRARY_NAME}_static STATIC > > @@ -1982,7 +2038,7 @@ if(WIN32) > > # For compatibility, build the shared library without the "lib" pr > efix on > > # MinGW as well. > > # > > - set_target_properties(${LIBRARY_NAME} PROPERTIES > > + set_target_properties(${LIBRARY_NAME} PROPERTIES > > PREFIX "" > > OUTPUT_NAME "${LIBRARY_NAME}" > > ) > > @@ -2020,6 +2076,118 @@ if(NOT C_ADDITIONAL_FLAGS STREQUAL "") > > set_target_properties(${LIBRARY_NAME}_static PROPERTIES COMPILE_FLAGS > ${C_ADDITIONAL_FLAGS}) > > endif() > > > > +# > > +# On macOS, build libpcap for the appropriate architectures, if > > +# CMAKE_OSX_ARCHITECTURES isn't set (if it is, let that control > > +# the architectures for which to build it). > > +# > > +if(APPLE AND "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "") > > + # > > + # Get the major version of Darwin. > > + # > > + string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MAJOR "${CMAKE_SYSTEM_VE > RSION}") > > + > > + if(SYSTEM_VERSION_MAJOR LESS 8) > > + # > > + # Pre-Tiger. Build only for 32-bit PowerPC. > > + # > > + set(OSX_LIBRARY_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_PATC > H_VERSION ${CMAKE_SYSTEM_VERSION}) > > + string(REGEX MATCH "^([0-9]+)" SYSTEM_VERSION_MINOR "${SYSTEM_MINO > R_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(OSX_LIBRARY_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 32-bit x86, > > + # with 32-bit PowerPC first. > > + # (I'm guessing that's what Apple does.) > > + # > > + set(OSX_LIBRARY_ARCHITECTURES "ppc;ppc64;i386") > > + else() > > + # > > + # With Intel support including x86-64 support. > > + # Build for 32-bit PowerPC, 64-bit PowerPC, 32-bit x86, > > + # and x86-64, with 32-bit PowerPC first. > > + # (I'm guessing that's what Apple does.) > > + # > > + set(OSX_LIBRARY_ARCHITECTURES "ppc;ppc64;i386;x86_64") > > + endif() > > + elseif(SYSTEM_VERSION_MAJOR EQUAL 9) > > + # > > + # Leopard. Build for 32-bit PowerPC, 64-bit > > + # PowerPC, 32-bit x86, and x86-64, with 32-bit PowerPC > > + # first. (That's what Apple does.) > > + # > > + set(OSX_LIBRARY_ARCHITECTURES "ppc;ppc64;i386;x86_64") > > + elseif(SYSTEM_VERSION_MAJOR EQUAL 10) > > + # > > + # Snow Leopard. Build for x86-64, 32-bit 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(OSX_LIBRARY_ARCHITECTURES "x86_64;i386;ppc") > > + else() > > + # > > + # Post-Snow Leopard. Build for x86-64 and 32-bit x86, > > + # with x86-64 first. (That's what Apple does) > > + # XXX - update if and when Apple drops support > > + # for 32-bit x86 code and if and when Apple adds > > + # ARM-based Macs. (You're on your own for iOS etc.) > > + # > > + # XXX - check whether we *can* build for i386 and, if not, > > + # suggest that the user install the /usr/include headers if > > + # they want to build fat. > > + # > > + cmake_push_check_state() > > + set(CMAKE_REQUIRED_FLAGS "-arch i386") > > + check_c_source_compiles( > > +"int > > +main(void) > > +{ > > + return 0; > > +} > > +" > > + X86_32_BIT_SUPPORTED) > > + cmake_pop_check_state() > > + if(X86_32_BIT_SUPPORTED) > > + set(OSX_LIBRARY_ARCHITECTURES "x86_64;i386") > > + else() > > + set(OSX_LIBRARY_ARCHITECTURES "x86_64") > > + if(SYSTEM_VERSION_MAJOR LESS 18) > > + # > > + # Pre-Mojave; the command-line tools should be sufficient > to > > + # enable 32-bit x86 builds. > > + # > > + message(WARNING "Compiling for 32-bit x86 gives an error; > try installing the command-line tools") > > + else() > > + message(WARNING "Compiling for 32-bit x86 gives an error; > try installing the command-line tools and, after that, installing the /usr/in > clude headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK > _headers_for_macOS_10.14.pkg package") > > + endif() > > + endif() > > + endif() > > + if(BUILD_SHARED_LIBS) > > + set_target_properties(${LIBRARY_NAME} PROPERTIES > > + OSX_ARCHITECTURES "${OSX_LIBRARY_ARCHITECTURES}") > > + endif(BUILD_SHARED_LIBS) > > + set_target_properties(${LIBRARY_NAME}_static PROPERTIES > > + OSX_ARCHITECTURES "${OSX_LIBRARY_ARCHITECTURES}") > > +endif() > > + > > ###################################### > > # Write out the config.h file > > ###################################### > > @@ -2079,6 +2247,7 @@ set(MAN3PCAP_EXPAND > > pcap_list_tstamp_types.3pcap.in > > pcap_open_dead.3pcap.in > > pcap_open_offline.3pcap.in > > + pcap_set_immediate_mode.3pcap.in > > pcap_set_tstamp_precision.3pcap.in > > pcap_set_tstamp_type.3pcap.in > > ) > > @@ -2114,9 +2283,8 @@ set(MAN3PCAP_NOEXPAND > > pcap_open_live.3pcap > > pcap_set_buffer_size.3pcap > > pcap_set_datalink.3pcap > > - pcap_set_immediate_mode.3pcap > > pcap_set_promisc.3pcap > > - pcap_set_protocol.3pcap > > + pcap_set_protocol_linux.3pcap > > pcap_set_rfmon.3pcap > > pcap_set_snaplen.3pcap > > pcap_set_timeout.3pcap > > @@ -2179,11 +2347,13 @@ if(WIN32) > > endif(NOT MINGW) > > endif(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8) > > else(WIN32) > > - install(TARGETS ${LIBRARY_NAME} ${LIBRARY_NAME_STATIC} DESTINATION lib > ) > > + install(TARGETS ${LIBRARY_NAME} ${LIBRARY_NAME_STATIC} DESTINATION ${C > MAKE_INSTALL_FULL_LIBDIR}) > > endif(WIN32) > > > > install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pcap/ DESTINATION include/pc > ap) > > install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap.h DESTINATION include) > > +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-bpf.h DESTINATION include) > > +install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pcap-namedb.h DESTINATION includ > e) > > > > # On UN*X, and on Windows when not using MSVC, generate libpcap.pc and > > # pcap-config and process man pages and arrange that they be installed. > > @@ -2223,8 +2393,8 @@ if(NOT MSVC) > > foreach(LIB ${PCAP_LINK_LIBRARIES}) > > set(LIBS "${LIBS} -l${LIB}") > > endforeach(LIB) > > - configure_file(${CMAKE_SOURCE_DIR}/pcap-config.in ${CMAKE_CURRENT_BINA > RY_DIR}/pcap-config @ONLY) > > - configure_file(${CMAKE_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRENT_BINAR > Y_DIR}/libpcap.pc @ONLY) > > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/pcap-config.in ${CMAKE_CURR > ENT_BINARY_DIR}/pcap-config @ONLY) > > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpcap.pc.in ${CMAKE_CURRE > NT_BINARY_DIR}/libpcap.pc @ONLY) > > install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/pcap-config DESTINATION b > in) > > install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpcap.pc DESTINATION lib/p > kgconfig) > > > > @@ -2236,17 +2406,17 @@ if(NOT MSVC) > > # > > set(MAN1 "") > > foreach(MANPAGE ${MAN1_NOEXPAND}) > > - set(MAN1 ${MAN1} ${CMAKE_SOURCE_DIR}/${MANPAGE}) > > + set(MAN1 ${MAN1} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE}) > > endforeach(MANPAGE) > > install(FILES ${MAN1} DESTINATION ${CMAKE_INSTALL_MANDIR}/man1) > > > > set(MAN3PCAP "") > > foreach(MANPAGE ${MAN3PCAP_NOEXPAND}) > > - set(MAN3PCAP ${MAN3PCAP} ${CMAKE_SOURCE_DIR}/${MANPAGE}) > > + set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_SOURCE_DIR}/${MANPAGE}) > > endforeach(MANPAGE) > > foreach(TEMPLATE_MANPAGE ${MAN3PCAP_EXPAND}) > > string(REPLACE ".in" "" MANPAGE ${TEMPLATE_MANPAGE}) > > - configure_file(${CMAKE_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CUR > RENT_BINARY_DIR}/${MANPAGE} @ONLY) > > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${C > MAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY) > > set(MAN3PCAP ${MAN3PCAP} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE}) > > endforeach(TEMPLATE_MANPAGE) > > install(FILES ${MAN3PCAP} DESTINATION ${CMAKE_INSTALL_MANDIR}/man3) > > @@ -2270,7 +2440,7 @@ if(NOT MSVC) > > set(MANFILE "") > > foreach(TEMPLATE_MANPAGE ${MANFILE_EXPAND}) > > string(REPLACE ".manfile.in" ".${MAN_FILE_FORMATS}" MANPAGE ${TEMP > LATE_MANPAGE}) > > - configure_file(${CMAKE_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CUR > RENT_BINARY_DIR}/${MANPAGE} @ONLY) > > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${C > MAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY) > > set(MANFILE ${MANFILE} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE}) > > endforeach(TEMPLATE_MANPAGE) > > install(FILES ${MANFILE} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_ > FILE_FORMATS}) > > @@ -2278,7 +2448,7 @@ if(NOT MSVC) > > set(MANMISC "") > > foreach(TEMPLATE_MANPAGE ${MANMISC_EXPAND}) > > string(REPLACE ".manmisc.in" ".${MAN_MISC_INFO}" MANPAGE ${TEMPLAT > E_MANPAGE}) > > - configure_file(${CMAKE_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${CMAKE_CUR > RENT_BINARY_DIR}/${MANPAGE} @ONLY) > > + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE_MANPAGE} ${C > MAKE_CURRENT_BINARY_DIR}/${MANPAGE} @ONLY) > > set(MANMISC ${MANMISC} ${CMAKE_CURRENT_BINARY_DIR}/${MANPAGE}) > > endforeach(TEMPLATE_MANPAGE) > > install(FILES ${MANMISC} DESTINATION ${CMAKE_INSTALL_MANDIR}/man${MAN_ > MISC_INFO}) > > > > Copied: head/contrib/libpcap/CONTRIBUTING.md (from r353141, vendor/libpcap/ > dist/CONTRIBUTING.md) > > =========================================================================== > === > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/contrib/libpcap/CONTRIBUTING.md Sat Dec 21 21:01:03 2019 > (r355988, copy of r353141, vendor/libpcap/dist/CONTRIBUTING.md) > > @@ -0,0 +1,29 @@ > > +Guidelines for contributing > > +=========================== > > + > > +To report a security issue (segfault, buffer overflow, infinite loop, arbi > trary > > +code execution etc) please send an e-mail to security@tcpdump.org, do not > use > > +the bug tracker! > > + > > +To report a non-security problem (failure to compile, failure to capture p > ackets > > +properly, missing support for a network interface type or DLT) please chec > k > > +first that it reproduces with the latest stable release of libpcap. If it > does, > > +please check that the problem reproduces with the current git master branc > h of > > +libpcap. If it does (and it is not a security-related problem, otherwise s > ee > > +above), please navigate to https://github.com/the-tcpdump-group/libpcap/is > sues > > +and check if the problem has already been reported. If it has not, please > open > > +a new issue and provide the following details: > > + > > +* libpcap version (e.g. from tcpdump --version) > > +* operating system name and version and any other details that may be rele > vant > > + (uname -a, compiler name and version, CPU type etc.) > > +* configure flags if any were used > > +* statement of the problem > > +* steps to reproduce > > + > > +Please note that if you know exactly how to solve the problem and the solu > tion > > +would not be too intrusive, it would be best to contribute some developmen > t time > > +and open a pull request instead. > > + > > +Still not sure how to do? Feel free to [subscribe](https://www.tcpdump.org > /#mailing-lists) > > +to the mailing list tcpdump-workers@lists.tcpdump.org and ask! > > > > Modified: head/contrib/libpcap/CREDITS > > =========================================================================== > === > > --- head/contrib/libpcap/CREDITS Sat Dec 21 19:23:33 2019 (r3 > 55987) > > +++ head/contrib/libpcap/CREDITS Sat Dec 21 21:01:03 2019 (r3 > 55988) > > @@ -1,21 +1,18 @@ > > -This file lists people who have contributed to libpcap: > > +This file lists people who have contributed to libpcap. > > > > -The current maintainers: > > - Bill Fenner > > +The current maintainers (in alphabetical order): > > Denis Ovsienko > > - Fulvio Risso > > + Francois-Xavier Le Bail r> > > Guy Harris > > - Hannes Gredler > > Michael Richardson ca> > > - Francois-Xavier Le Bail > > > > -Additional people who have contributed patches: > > - > > +Additional people who have contributed patches (in alphabetical order): > > Akos Vandra > > Alan Bawden > > Albert Chin > > Alexander 'Leo' Bergolth at> > > Alexey Kuznetsov > > + Ali Abdulkadir > > Alon Bar-Lev > > Andres Perera > > Andrew Brown > > @@ -62,6 +59,7 @@ Additional people who have contributed patches: > > Gabor Tatarka > > Garrett Cooper > > George Neville-Neil > > + Gerard Garcia > > Gianluca Varenni > > Gilbert Hoyek > > Gisle Vanem > > @@ -99,6 +97,7 @@ Additional people who have contributed patches: > > Koryn Grant > > Kris Katterjohn > > Krzysztof Halasa > > + Lennert Buytenhek > > Lorenzo Cavallaro > > Loris Degioanni t> > > Love Hörnquist-Åstrand > > @@ -114,6 +113,7 @@ Additional people who have contributed patches: > > Márton Németh > > Matthew Luckie > > Max Laier > > + Michal Kubecek > > Michal Labedzki > > Michal Sekletar > > Mike Frysinger > > @@ -129,7 +129,7 @@ Additional people who have contributed patches: > > Olaf Kirch > > Ollie Wild > > Onno van der Linden > > - Paolo Abeni > > + Paolo Abeni > > Patrick Marie > > Patrick McHardy > > Paul Mundt > > @@ -145,6 +145,8 @@ Additional people who have contributed patches: > > Rick Jones > > Robert Edmonds > > Roberto Mariani > > + Rongxi Li > > + Roland Dreier > > Romain Francoise > > Sagun Shakya > > Scott Barron > > @@ -167,6 +169,7 @@ Additional people who have contributed patches: > > Wesley Shields > > Xianjie Zhang > > Xin Li > > + Xue Jiang Qing > > Yen Yen Lim > > Yoann Vandoorselaere > > Yvan Vanhullebus > > @@ -176,5 +179,8 @@ The original LBL crew: > > Craig Leres > > Van Jacobson > > > > -Past maintainers: > > - Jun-ichiro itojun Hagino > Also see: http://www.wide.ad.jp/itojun-award/ > > +Past maintainers (in alphabetical order): > > + Bill Fenner > > + Fulvio Risso > > + Hannes Gredler > > + Jun-ichiro itojun Hagino Als > o see: http://www.wide.ad.jp/itojun-award/ > > > > Copied: head/contrib/libpcap/INSTALL.md (from r353141, vendor/libpcap/dist/ > INSTALL.md) > > =========================================================================== > === > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > +++ head/contrib/libpcap/INSTALL.md Sat Dec 21 21:01:03 2019 (r3 > 55988, copy of r353141, vendor/libpcap/dist/INSTALL.md) > > @@ -0,0 +1,352 @@ > > +To build libpcap, run "./configure" (a shell script). The configure > > +script will determine your system attributes and generate an > > +appropriate Makefile from Makefile.in. Next run "make". If everything > > +goes well you can su to root and run "make install". However, you need > > +not install libpcap if you just want to build tcpdump; just make sure > > +the tcpdump and libpcap directory trees have the same parent > > +directory. > > + > > +If configure says: > > + > > + configure: warning: cannot determine packet capture interface > > + configure: warning: (see INSTALL for more info) > > + > > +then your system either does not support packet capture or your system > > +does support packet capture but libpcap does not support that > > +particular type. (If you have HP-UX, see below.) If your system uses a > > +packet capture not supported by libpcap, please send us patches; don't > > +forget to include an autoconf fragment suitable for use in > > +configure.ac. > > + > > +It is possible to override the default packet capture type, although > > +the circumstance where this works are limited. For example if you have > > +installed bpf under SunOS 4 and wish to build a snit libpcap: > > + > > + ./configure --with-pcap=snit > > + > > +Another example is to force a supported packet capture type in the case > > +where the configure scripts fails to detect it. > > + > > +You will need an ANSI C compiler to build libpcap. The configure script > > +will abort if your compiler is not ANSI compliant. If this happens, use > > +the generally available GNU C compiler (GCC). > > + > > +You will need either Flex 2.5.31 or later, or a version of Lex > > +compatible with it (if any exist), to build libpcap. The configure > > +script will abort if there isn't any such program. If you have an older > > +version of Flex, or don't have a compatible version of Lex, the current > > +version of flex is available at flex.sourceforge.net. > > + > > +You will need either Bison, Berkeley YACC, or a version of YACC > > +compatible with them (if any exist), to build libpcap. The configure > > +script will abort if there isn't any such program. If you don't have > > +any such program, the current version of Bison can be found at > > +http://ftp.gnu.org/gnu/bison/ and the current version of Berkeley YACC > > +can be found at http://invisible-island.net/byacc/. > > + > > +Sometimes the stock C compiler does not interact well with Flex and > > +Bison. The list of problems includes undefined references for alloca. > > +You can get around this by installing GCC. > > + > > +If you use Solaris, there is a bug with bufmod(7) that is fixed in > > +Solaris 2.3.2 (aka SunOS 5.3.2). Setting a snapshot length with the > > +broken bufmod(7) results in data be truncated from the FRONT of the > > +packet instead of the end. The work around is to not set a snapshot > > +length but this results in performance problems since the entire packet > > +is copied to user space. If you must run an older version of Solaris, > > +there is a patch available from Sun; ask for bugid 1149065. After > > +installing the patch, use "setenv BUFMOD_FIXED" to enable use of > > +bufmod(7). However, we recommend you run a more current release of > > +Solaris. > > + > > +If you use the SPARCompiler, you must be careful to not use the > > +/usr/ucb/cc interface. If you do, you will get bogus warnings and > > +perhaps errors. Either make sure your path has /opt/SUNWspro/bin > > +before /usr/ucb or else: > > + > > + setenv CC /opt/SUNWspro/bin/cc > > + > > +before running configure. (You might have to do a "make distclean" > > +if you already ran configure once). > > + > > +If you are trying to do packet capture with a FORE ATM card, you may or > > +may not be able to. They usually only release their driver in object > > +code so unless their driver supports packet capture, there's not much > > +libpcap can do. > > + > > +If you get an error like: > > + > > + tcpdump: recv_ack: bind error 0x??? > > + > > +when using DLPI, look for the DL_ERROR_ACK error return values, usually > > +in /usr/include/sys/dlpi.h, and find the corresponding value. > > + > > +Under {DEC OSF/1, Digital UNIX, Tru64 UNIX}, packet capture must be > > +enabled before it can be used. For instructions on how to enable packet > > +filter support, see: > > + > > + ftp://ftp.digital.com/pub/Digital/dec-faq/Digital-UNIX > > + > > +Look for the "How do I configure the Berkeley Packet Filter and capture > > +tcpdump traces?" item. > > + > > +Once you enable packet filter support, your OSF system will support bpf > > > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > --==_Exmh_1588623126_39090 Content-Type: text/plain ; name="wpa-fix.diff"; charset=iso-8859-1 Content-Description: wpa-fix.diff Content-Disposition: attachment; filename="wpa-fix.diff" Content-Transfer-Encoding: 8bit diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c index 837a31813..6067dc391 100644 --- a/src/drivers/driver_bsd.c +++ b/src/drivers/driver_bsd.c @@ -693,7 +693,7 @@ static void bsd_wireless_event_receive(int sock, void *ctx, void *sock_ctx) { struct bsd_driver_data *drv = ctx; - char buf[2048]; + char buf[2048] __attribute__ ((aligned (4))); struct if_announcemsghdr *ifan; struct rt_msghdr *rtm; struct ieee80211_michael_event *mic; @@ -1117,7 +1117,7 @@ static void wpa_driver_bsd_event_receive(int sock, void *ctx, void *sock_ctx) { struct bsd_driver_data *drv = sock_ctx; - char buf[2048]; + char buf[2048] __attribute__ ((aligned (4))); struct if_announcemsghdr *ifan; struct if_msghdr *ifm; struct rt_msghdr *rtm; --==_Exmh_1588623126_39090 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. --==_Exmh_1588623126_39090-- From owner-freebsd-mips@freebsd.org Mon May 4 20:16:33 2020 Return-Path: Delivered-To: freebsd-mips@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F6592C1D48; Mon, 4 May 2020 20:16:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49GDdr4LwBz3G5x; Mon, 4 May 2020 20:16:32 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qt1-f180.google.com with SMTP id 71so75048qtc.12; Mon, 04 May 2020 13:16:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yDaOQiIGwxT3LHKVrtyKfNwS6AgOSYEQ4aE3yeivvME=; b=YPqTSk6bH+4VBCqgfq9kRPEU5UUSDdrlO/Eijyxu6gbkXB502VHCCf2Av0X0h7IxcP kpQIbhiuEXYNEYlcJeQRj/L1Bbav7jFyvVYb57qYO2YDtW4kqm3BjEwQWi8s+nNOSjyQ AgbPQGXvjsMs5Hw/iNGAUrTHH3PVLE+jDuxuO+CWF1dqNTDaCOgOeA09ZTzrX+/qgaxD gfUD3uvgEEn9KW0LbDoO1UovVOAboioxcp/ZOPdc3B3/YL2LZGyQcHhtzny5u/t76eAL DqW4M0Cf8a+H81SrWKAMeRfS5LxC/Zvr2cHeBZxebpNs/CJ8KZZBFIUUkRSBlGT5eU1G 7V0g== X-Gm-Message-State: AGi0PuY8ihE+Qv1BLDAVkRJ9qmk4SMZbxg6oHrJ3oilMhDYW+B9ReWTw 4xHFYFwUn4IL7/cBoo9UgN2zH2XSG76dytr8do29/A== X-Google-Smtp-Source: APiQypJX9bC0c/jnxse1d5ifWaOwxcI+RLZAH00g3oyCkgx41ZCc7CAScsXvpBgEjAFCvY06egRgUuRfwN4kO8B7330= X-Received: by 2002:ac8:71d8:: with SMTP id i24mr932537qtp.223.1588623391385; Mon, 04 May 2020 13:16:31 -0700 (PDT) MIME-Version: 1.0 References: <201912212101.xBLL14sr033938@repo.freebsd.org> <202005042012.044KCpa4002687@slippy.cwsent.com> In-Reply-To: <202005042012.044KCpa4002687@slippy.cwsent.com> From: Adrian Chadd Date: Mon, 4 May 2020 13:16:18 -0700 Message-ID: Subject: Re: svn commit: r355988 - in head: contrib/libpcap contrib/libpcap/cmake/Modules contrib/libpcap/doc contrib/libpcap/missing contrib/libpcap/msdos contrib/libpcap/pcap contrib/libpcap/rpcapd contrib/li... To: Cy Schubert Cc: Cy Schubert , "freebsd-mips@freebsd.org" , freebsd-wireless Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49GDdr4LwBz3G5x X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 209.85.160.180 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-3.49 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[adrian@freebsd.org,adrianchadd@gmail.com]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; RCVD_TLS_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[180.160.85.209.list.dnswl.org : 127.0.5.0]; RWL_MAILSPIKE_GOOD(0.00)[180.160.85.209.rep.mailspike.net : 127.0.0.18]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; IP_SCORE(-1.49)[ip: (-6.59), ipnet: 209.85.128.0/17(-0.40), asn: 15169(-0.43), country: US(-0.05)]; FORGED_SENDER(0.30)[adrian@freebsd.org,adrianchadd@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2020 20:16:33 -0000 Heh, it's not this - the unaligned print only happens when I run tcpdump with an ether src or ether dst filter. If i just use ether proto it doesn't happen. So there is something unaligned going on inside libpcap /and/ somehow ether dst is not working right at least on mips + 802.11 DLT. -adrian From owner-freebsd-mips@freebsd.org Mon May 4 21:05:33 2020 Return-Path: Delivered-To: freebsd-mips@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 03D8A2C3383; Mon, 4 May 2020 21:05:33 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-so.shaw.ca (smtp-out-so.shaw.ca [64.59.136.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49GFkN4Dxhz3Jyh; Mon, 4 May 2020 21:05:32 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id ViHIjPJpKYYpxViHJjXiNj; Mon, 04 May 2020 15:05:30 -0600 X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=sTwFKg_x9MkA:10 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=Je4aE-p9L2BNvjK-cgsA:9 a=CjuIK1q_8ugA:10 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=Z5ABNNGmrOfJ6cZ5bIyy:22 a=QOGEsqRv6VhmHaoFNykA:22 Received: from slippy.cwsent.com (slippy [IPv6:fc00:1:1:1::5b]) by spqr.komquats.com (Postfix) with ESMTPS id 75033DCA; Mon, 4 May 2020 14:05:27 -0700 (PDT) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 044L5RWQ005735; Mon, 4 May 2020 14:05:27 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 044L5RQV005732; Mon, 4 May 2020 14:05:27 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202005042105.044L5RQV005732@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Adrian Chadd cc: Cy Schubert , Cy Schubert , "freebsd-mips@freebsd.org" , freebsd-wireless Subject: Re: svn commit: r355988 - in head: contrib/libpcap contrib/libpcap/cmake/Modules contrib/libpcap/doc contrib/libpcap/missing contrib/libpcap/msdos contrib/libpcap/pcap contrib/libpcap/rpcapd contrib/li... In-reply-to: References: <201912212101.xBLL14sr033938@repo.freebsd.org> <202005042012.044KCpa4002687@slippy.cwsent.com> Comments: In-reply-to Adrian Chadd message dated "Mon, 04 May 2020 13:16:18 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 04 May 2020 14:05:27 -0700 X-CMAE-Envelope: MS4wfMfe5QRZ6yPCE3CzmkChyJW7KSK+KJce6kjVpue92VA/fglu1NRjZC0IUZ9hZPhAM017wg7ZU+PiZj6pZMTL79XLA0VHKB0e5HN6lu5CbKyd/OB79mLz 0nJMACixsxLAx+FS+hV+0Sp6uX6pVx7v92eHOpNms9NwW7a51Jv7pau9nBDnaA8m9cGjixrChbE+fsJ2QHiFXPnh9wFV0u1tLueGD/WUK+reMoFAgq2vhDgW NvA0P7OiVsnjz6WA4JsuIcYTjrK//XFDuCXXm4X6jqTZF8idsK5xoLmemyZtxPlY X-Rspamd-Queue-Id: 49GFkN4Dxhz3Jyh X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2020 21:05:33 -0000 In message , Adrian Chadd writes: > Heh, it's not this - the unaligned print only happens when I run > tcpdump with an ether src or ether dst filter. If i just use ether > proto it doesn't happen. > > So there is something unaligned going on inside libpcap /and/ somehow > ether dst is not working right at least on mips + 802.11 DLT. Nothing jumps out at me looking through the libpcap git logs. If you can get a line number to me, that would help a lot. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org The need of the many outweighs the greed of the few. From owner-freebsd-mips@freebsd.org Thu May 7 13:37:00 2020 Return-Path: Delivered-To: freebsd-mips@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C8B762D9848 for ; Thu, 7 May 2020 13:37:00 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2k.ore.mailhop.org (outbound2k.ore.mailhop.org [54.148.219.64]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49HvdS28LKz4Bts for ; Thu, 7 May 2020 13:37:00 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1588858618; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=VTx59YtT8ISC+dReflxpa1wW7ur3s9jmsFEYGY79Unuefdg5htQM0o2ENX09T+xZYdLEKHCNQb2T+ 75Qe4hOoDhgc9V8LkDtBEH4kEj2i4Lc7cN7mTfBsdWstXS+P8SrwWy7HsZhBwcQcDmdPUUaus1X8aR ahzG9Fx/37HmGm4WXELsa80IuWnUtexAlGnnxG2VwVcX78xs3ivwcBTcrJAj9UKVmsBzmRmiq2BpMy dV2HTIXCvukQWV3VxGlikcHFJCAi+JVlakuZxWQSHlkzb3NW2uWoVNMfUMO0sZEqZUNaXj9AUNML3s mArrSmBgDJsYfxmHpqfFHyLp7XpAxrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=31XMvX4QjO5QrvuOT66MMc3Tu6A4cAWIgNfZLFpehJo=; b=oEfXmXdMIxDzh+SjJtsBLs0pF0BQBa1WpHhi++87tqa8QWp7r8oebkElBws5tkttiP4AEdXqBxnI2 jHUHBCnKcSAWj1ucrUdI4An26Xf6IbMKEmqKzBDl6wkEiM1GpZFYD5890SSLVb493FC6A6V3m0AzvR 9L1yLn87aw9Zl4DEs5YYQAUSexxtp5IbT2gvA0uuv0M69mnQf/uJjs2VbcYn5M2uVMmn8vPvnbE5Kg iWFQP8fnXcSALWWlCmuTFd3S8D7Yxc18qrUmc4rDCEtNC6D1+Fry2hfEdCqOAT1Q04lVDpLfZXZEhg OOKQrbbPsQElEhaMDk55ytCvrdA9ITw== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=31XMvX4QjO5QrvuOT66MMc3Tu6A4cAWIgNfZLFpehJo=; b=S5KhmuEt5KC4+lHxf4RjI2TH+BotUcUj8QzH7M2lOlIR3vtPITtVAa6sMTrW5zkJFdKgB5OBMUXXc KVwCcUcoiyP3iRgQurB7J6srXxHxxEULhs74QFskhjcF9G1P36pFJErD5LESnsC8cbHb+V0pXrvpCe ZGxBM3ugQ7kAGNEr80alYHsOQ/LyiTsOVZ2Uv0QFP8NAHFFJcKiFKvJ/CJGbAzWQSpWBdn+eQS3z5M ZBMjm8OrP/tC9RaYp5KNV9TLPEXQm1iBPsCvdq59ezGC45sp4MiltAYh/WRIS+HNIIjpoDhNINxHYq yXS86fk/OOqWUaUAOXMjT/ucTfgyOZw== X-MHO-RoutePath: aGlwcGll X-MHO-User: d1db6241-9067-11ea-a066-6d02e42e573a X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (c-67-177-211-60.hsd1.co.comcast.net [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id d1db6241-9067-11ea-a066-6d02e42e573a; Thu, 07 May 2020 13:36:57 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id 047Dau9O058730; Thu, 7 May 2020 07:36:56 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <76d62a1d20f531e9db39f92b4351567ab3b98ca5.camel@freebsd.org> Subject: Re: gpioiic broken From: Ian Lepore To: Mori Hiroki , Adrian Chadd Cc: "freebsd-mips@freebsd.org" Date: Thu, 07 May 2020 07:36:56 -0600 In-Reply-To: <125380013.2123854.1584966874124.JavaMail.yahoo@mail.yahoo.co.jp> References: <1108317063.1498223.1581900661769.JavaMail.yahoo.ref@mail.yahoo.co.jp> <1108317063.1498223.1581900661769.JavaMail.yahoo@mail.yahoo.co.jp> <1724885207.1503385.1581913230327.JavaMail.yahoo@mail.yahoo.co.jp> <681236605.1547115.1581952951792.JavaMail.yahoo@mail.yahoo.co.jp> <270825546.1589165.1582016401868.JavaMail.yahoo@mail.yahoo.co.jp> <125380013.2123854.1584966874124.JavaMail.yahoo@mail.yahoo.co.jp> Content-Type: text/plain; charset="ASCII" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49HvdS28LKz4Bts X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.95 / 15.00]; TAGGED_RCPT(0.00)[]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.95)[-0.955,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; NEURAL_HAM_LONG(-0.99)[-0.992,0] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2020 13:37:00 -0000 On Mon, 2020-03-23 at 21:34 +0900, Mori Hiroki wrote: > Hi > > sorry too late reply. > > I have no time debug this issue. > > I also use gpioiic on RTL8366SR etherswitch controle on Buffalo_WZR- > HP-G300NN. > > It's also panic in boot. > > If you can't debug this then I think revert this change > on 12-STABLE. Because of STABLE to be stable. STABLE is > NOT CURRENT. > > Thanks > > Hiroki Mori > I also have had no time to investigate this, but today Andriy (avg@) figured out the problem and committed a fix in r360779, which will be mfc'd in about a week. -- Ian > ----- Original Message ----- > > From: Ian Lepore > > To: Adrian Chadd ; Mori Hiroki < > > yamori813@yahoo.co.jp> > > Cc: "freebsd-mips@freebsd.org" > > Date: 2020/2/20, Thu 11:18 > > Subject: Re: gpioiic broken > > > > On Wed, 2020-02-19 at 17:55 -0800, Adrian Chadd wrote: > > > On Tue, 18 Feb 2020 at 01:00, Mori Hiroki > > > wrote: > > > > > > > > Hi > > > > > > > > Now CURRENT is very very very unstable. > > > > > > > > Please do stable at STABLE. > > > > > > > > > > > > > hm, how's -head unstable for you on mips? > > > > > > It was fine a month or two ago when i last updated. > > > > > > re: iic, i can give it a whirl; maybe it's a device ordering > > > thing we > > > need to just express in our hints files for mips? > > > > > > -a > > > > Even just decoding a bit of this: > > > > --- exception, cause ffffffff80566100 badvaddr ffffffff8014a334 --- > > device_get_nameunit (?,?,?,?) ra 8007521c sp 803b8ba8 sz 0 > > gpio_pin_getcaps+0xd08 (?,?,?,?) ra 0 sp 803b8ba8 sz 0 > > > > like turning gpio_pin_getcaps+0xd08 into file+line of kernel source > > would be a good clue. > > > > -- Ian > > > > > > > > > > From owner-freebsd-mips@freebsd.org Fri May 8 22:03:13 2020 Return-Path: Delivered-To: freebsd-mips@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DEEBC2E5E39 for ; Fri, 8 May 2020 22:03:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qk1-x732.google.com (mail-qk1-x732.google.com [IPv6:2607:f8b0:4864:20::732]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Jkq30tKxz3LK2 for ; Fri, 8 May 2020 22:03:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qk1-x732.google.com with SMTP id q7so3417081qkf.3 for ; Fri, 08 May 2020 15:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=lUQqRokAMLe/eeU/xXAK6aO27pdqs8Bc32gxlLXGjkQ=; b=fVwG0BX/pAq/4SlkjgEcO4uCtQw5BeGfnqtdd9VxiifqJh7MtZDovGCT4UA4zWjc/g zgPXlR6gtB4yEzTPzCq1oY/pGuhTTdplcJmO0cB2tWDik0Wf/bosB66IokiXxbVubNR9 J1wwOh8sbbS4xXBzqQL8zKi6r5SBLhItx+VTgsQZ6IrMQTiomL+m51RGKj0BUwRXGnVl 5Fb2g9UkYeBVBLwBah1Kz9j4juIe4zRCrU/2EOGV8youDw0GTbhMDlwZ2kcz180AFa8Q 0UUCN7+Ap3TiMnZmpewu8eFKnJ6lToYXJxM6UYjHq5ai65vdUi6j49OYlfoy/UoLYXbF XoKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=lUQqRokAMLe/eeU/xXAK6aO27pdqs8Bc32gxlLXGjkQ=; b=OQdp5ExJSpsFtRYsGhEbHX39PTaNLKjnSDSEUJAkbidZHUf8/des6XVzS9sme5BWlA J1ovmxYQhTOCEUK2KjBoHGZ1tlzeEfQBQeXUoPn8JYxbaPYAUp3EqqNMzII3Fe6E9TEA c31p/1IgblndVhFV2IkIscND6jf67/Vrgaa9tdhvNBcx/fNM0F74eQJ2wWlGWuxgMKrN dKP7bwhAIb7xRZCqXW1rQM6muB4kt6v8x5oUnrB75XteiyEDC/o8i8/wazDGQdvIGGBs kT3CzH1KeqLg+vo7Uuv7vJ9JgBHxz/JuOUagNGfbpr15dBxACHl5LwnKjY1/I4oOV78K bW/g== X-Gm-Message-State: AGi0PuYTQtXFwYmspc3zmnIKoIr0r6OM75a3H0U8U5onlOsauFaK4Fwb J5TYVXOa/t1Efg8N10GpAlj7CWMen+Lq13WjIhhGuA== X-Google-Smtp-Source: APiQypJh1nZyf1ILhG9YtwcO5zsXLfjCoLciA10KHkXo0lTDDocI1xHyL5ewlytjf//jOeXpRRFAoUd+Djc6wgNzlUk= X-Received: by 2002:a37:6690:: with SMTP id a138mr5080888qkc.152.1588975390180; Fri, 08 May 2020 15:03:10 -0700 (PDT) MIME-Version: 1.0 References: <1126553482.4132161.1585714894446.JavaMail.yahoo.ref@mail.yahoo.co.jp> <1126553482.4132161.1585714894446.JavaMail.yahoo@mail.yahoo.co.jp> <1913964975.170961.1585956280139.JavaMail.yahoo@mail.yahoo.co.jp> In-Reply-To: <1913964975.170961.1585956280139.JavaMail.yahoo@mail.yahoo.co.jp> From: Adrian Chadd Date: Fri, 8 May 2020 15:02:57 -0700 Message-ID: Subject: Re: can not get mib from ar8316 on etherswitch To: Mori Hiroki Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49Jkq30tKxz3LK2 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=fVwG0BX/; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2607:f8b0:4864:20::732 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[yahoo.co.jp]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.29), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-mips@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2.3.7.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.32 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2020 22:03:13 -0000 hi! I can change the API to 32 bits. lemme do that on my test devices at home! -adrian On Fri, 3 Apr 2020 at 18:31, Mori Hiroki wrote: > > Hi > > I think this change have no compatibility. > But Atheros switch code use 32Bit address > value at register access. > > I make get mib script by mruby for AR8316 and RTL8366. > > https://github.com/ZRouter/ZRouter/tree/yamori813_modify/profiles/estools/files/usr/local/bin > > > I use this script on bsnmp-ucd. > > > ----- Original Message ----- > > From: Mori Hiroki > > To: "freebsd-mips@freebsd.org" > > Cc: > > Date: 2020/4/1, Wed 13:21 > > Subject: can not get mib from ar8316 on etherswitch > > > > Hi > > > > I try to get mib from AR8316. But I can not get value. > > > > AR8316 mib start from 0x20000. This is over 16bit. > > > > But member is only 16Bit in sys/dev/etherswitch/etherswitch.h. > > > > struct etherswitch_reg { > > uint16_t reg; > > uint32_t val; > > > > }; > > > > I think good that is change to uint32_t at reg. > > > > Do you think this ? > > > > Thanks > > > > Hiroki Mori > > > > _______________________________________________ > > freebsd-mips@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > > To unsubscribe, send any mail to > > "freebsd-mips-unsubscribe@freebsd.org" > > > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@freebsd.org Fri May 8 22:22:54 2020 Return-Path: Delivered-To: freebsd-mips@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3D8532E6424 for ; Fri, 8 May 2020 22:22:54 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49JlFn0qnmz3MLZ for ; Fri, 8 May 2020 22:22:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-qt1-x829.google.com with SMTP id i68so2819560qtb.5 for ; Fri, 08 May 2020 15:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DvxLlDzpojhDaCGDE8LAgIp14MphdDBwX0E7fJlV5s4=; b=VUuE9QGyOPVANbdeDiDp4yKwFALdp+gXsi4zZvGiC+7xIRsaOMMGjxQ6EwojKj/H0q z5fTh11xxfYv2s5KA+ucW35HOkCTs+Qq1TqhhlzKiwXY6uvfddW/QRRfqvKBvpL5RQn3 4yXjLmU58a/l2KuBPWkOfPurZEdUQtLIlC7uxOm2q7xxqKu8WosxFtMZRMagJa6vXviE wcQZnvIfFU8tFvWK0oVVkdozp9KEjbSIFQUPsz/s6LCWJAvEhpFIRsfSjLByQpxvnoGb NdWdiR/cpJJnX/Luf9cXvpANOjKaEGfFVUFxCeVzvsaVVEgsssUqh5WLOpmHQPbBtA6D cRUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DvxLlDzpojhDaCGDE8LAgIp14MphdDBwX0E7fJlV5s4=; b=E9XGunft5pPO3AhA3v+eMjtw26+dOvLcBxU1PB7foSLTSN9yrOgwYKYBgwgYQFf7p5 X7akF5PbKt+2RjjwXn4FbCbgzdOnQDYZSNdXr5fwUcIWiRxYnUX7X6EY9vqoCunsHfaS pvLgBBZe+r6noxumU7ABlqngSw1p+x0/Bakirpvg58PjZsZHu4u8Y4WbYCjOspVCook4 MkoY3m5mRnL7WdKFCW5F5q2cQ0TXw0BBH7P/9hwgsBMBWP1SASp7qULRR4PczWiSxuL7 nB7bsnvGfrbjUBx5iW4UnXdb1xiSdLBJRHa7nODFx8ozbm0XghI8Hup+eV1e1lMeMPS3 RM1w== X-Gm-Message-State: AGi0Pual/ci7nlTJ1CLe6Nf6BPqSSuWti0QfYP2GKMV0sF3jenOffuMK 3Jf3ljYqcf8K6C8j5GpYd70rnKzzbEgcI5ZLTVY= X-Google-Smtp-Source: APiQypJRk3DV5n+4vONJNTjatV5TJ3nc+0gzK0BHk5WGs6AIEhfcPxLwbIfnSrgAT4tD0iunnqB3ilg6mrhEJ3PxZFQ= X-Received: by 2002:ac8:c8b:: with SMTP id n11mr4890443qti.49.1588976572241; Fri, 08 May 2020 15:22:52 -0700 (PDT) MIME-Version: 1.0 References: <1126553482.4132161.1585714894446.JavaMail.yahoo.ref@mail.yahoo.co.jp> <1126553482.4132161.1585714894446.JavaMail.yahoo@mail.yahoo.co.jp> <1913964975.170961.1585956280139.JavaMail.yahoo@mail.yahoo.co.jp> In-Reply-To: From: Adrian Chadd Date: Fri, 8 May 2020 15:22:39 -0700 Message-ID: Subject: Re: can not get mib from ar8316 on etherswitch To: Mori Hiroki Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 49JlFn0qnmz3MLZ X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=VUuE9QGy; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of adrianchadd@gmail.com designates 2607:f8b0:4864:20::829 as permitted sender) smtp.mailfrom=adrianchadd@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[yahoo.co.jp]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.26), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-mips@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[9.2.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.32 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2020 22:22:54 -0000 Done, thanks! Let me know if you'd like to work on etherswitch/arswitch extensions to dump out the per-port MIBs. I'd really like to see that support show up. -adrian On Fri, 8 May 2020 at 15:02, Adrian Chadd wrote: > > hi! > > I can change the API to 32 bits. lemme do that on my test devices at home! > > > > -adrian > > On Fri, 3 Apr 2020 at 18:31, Mori Hiroki wrote: > > > > Hi > > > > I think this change have no compatibility. > > But Atheros switch code use 32Bit address > > value at register access. > > > > I make get mib script by mruby for AR8316 and RTL8366. > > > > https://github.com/ZRouter/ZRouter/tree/yamori813_modify/profiles/estools/files/usr/local/bin > > > > > > I use this script on bsnmp-ucd. > > > > > > ----- Original Message ----- > > > From: Mori Hiroki > > > To: "freebsd-mips@freebsd.org" > > > Cc: > > > Date: 2020/4/1, Wed 13:21 > > > Subject: can not get mib from ar8316 on etherswitch > > > > > > Hi > > > > > > I try to get mib from AR8316. But I can not get value. > > > > > > AR8316 mib start from 0x20000. This is over 16bit. > > > > > > But member is only 16Bit in sys/dev/etherswitch/etherswitch.h. > > > > > > struct etherswitch_reg { > > > uint16_t reg; > > > uint32_t val; > > > > > > }; > > > > > > I think good that is change to uint32_t at reg. > > > > > > Do you think this ? > > > > > > Thanks > > > > > > Hiroki Mori > > > > > > _______________________________________________ > > > freebsd-mips@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > > > To unsubscribe, send any mail to > > > "freebsd-mips-unsubscribe@freebsd.org" > > > > > > > _______________________________________________ > > freebsd-mips@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org"