FreeBSD/src a3b90a1usr.sbin/daemon daemon.c daemon.8

daemon: Add option for output file mode

The daemon utility has always created its output file with a fixed mode
of 0600. This causes issues for log collection setups where the collector
does not run as root but instead relies on group access to the watched
daemon’s log file.

Introduce a new option that allows specifying the output file mode using
install(1)-style semantics. This enables non-root log collectors to access
the file as intended and improves compatibility with log rotation tools.

Reviewed by:    kevans
MFC after:      1 week
Relnotes:       yes
Differential Revision:  https://reviews.freebsd.org/D54930
DeltaFile
+21-7usr.sbin/daemon/daemon.c
+15-2usr.sbin/daemon/daemon.8
+36-92 files

FreeBSD/src 4e160c6lib/libfetch common.c common.h

libfetch: Check for failure to create SSL context

* Drop the ssl_meth member, there is no reason to hang on to it.

* Replace deprecated SSLv23_client_method() with TLS_client_method().

* Check the return value from SSL_CTX_new().

MFC after:      1 week
PR:             292903
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D55098
DeltaFile
+7-3lib/libfetch/common.c
+0-1lib/libfetch/common.h
+7-42 files

FreeBSD/src 4548149sbin/ifconfig ifconfig.8, sys/netinet6 in6_ifattach.c

netinet6: Fix my style issues

Reported by:            pouria
Reviewed by:            pouria, ziaee, glebius
Approved by:            glebius
Fixes:                  31ec8b6407fdd5a87d70265762457c67ce618283
Differential Revision:  https://reviews.freebsd.org/D55136
DeltaFile
+9-13sys/netinet6/in6_ifattach.c
+11-8sbin/ifconfig/ifconfig.8
+20-212 files

FreeBSD/src e5cb813usr.bin/sockstat sockstat.c

sockstat: Surround explicit IPv6 addresses with brackets

PR:             254611
Approved by:    otis, tuexen, des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54375

(cherry picked from commit fe81e3944c085e765c83c4f78941d7529ceb556e)
DeltaFile
+9-0usr.bin/sockstat/sockstat.c
+9-01 files

FreeBSD/src 03c8e3eusr.bin/sockstat sockstat.c

sockstat: Surround explicit IPv6 addresses with brackets

PR:             254611
Approved by:    otis, tuexen, des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54375

(cherry picked from commit fe81e3944c085e765c83c4f78941d7529ceb556e)
DeltaFile
+9-0usr.bin/sockstat/sockstat.c
+9-01 files

FreeBSD/src 58a369ausr.bin/sockstat main.c

sockstat: Surround explicit IPv6 addresses with brackets

PR:             254611
Approved by:    otis, tuexen, des
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54375

(cherry picked from commit fe81e3944c085e765c83c4f78941d7529ceb556e)
DeltaFile
+9-1usr.bin/sockstat/main.c
+9-11 files

FreeBSD/src fa567festand/libsa/geli geliboot_crypto.c

libsa/geli: Fix a typo in an error message

- s/crypo/crypto/

MFC after:      5 days
DeltaFile
+1-1stand/libsa/geli/geliboot_crypto.c
+1-11 files

FreeBSD/src deb3c9dshare/man/man7 development.7

development.7: Refer to new port name for git-arc

The git-arc script was moved from devel/freebsd-git-devtools to
devel/freebsd-git-arc.

Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55128
DeltaFile
+2-2share/man/man7/development.7
+2-21 files

FreeBSD/src 32bd754tools/tools/git git-arc.1

git-arc.1: Refer to new port name

The git-arc script was moved from devel/freebsd-git-devtools to
devel/freebsd-git-arc.

Reviewed by:    ziaee
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55127
DeltaFile
+1-1tools/tools/git/git-arc.1
+1-11 files

FreeBSD/src 94be5dbsys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: catch possible NULL pointer deref with mt76

With mt76 we, for the first time, see that txstat->skb or
txstat->info may not be filled in linuxkpi_ieee80211_tx_status_ext().
Guard for these cases checking for skb and info to be not NULL and
assume a TX failure in case info is NULL.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+13-3sys/compat/linuxkpi/common/src/linux_80211.c
+13-31 files

FreeBSD/src c529e1asys/compat/linuxkpi/common/src linux_80211.c

LinuxKPI: 802.11: set extra tx info flag for EAPOL for mt76

mt76 requires IEEE80211_TX_CTL_USE_MINRATE to be set for EAPOL, so
add it.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+3-1sys/compat/linuxkpi/common/src/linux_80211.c
+3-11 files

FreeBSD/src 3afe9e1sys/contrib/dev/mediatek/mt76 eeprom.c

mt76: fix a check wrongly giving us random ether addresses all the time

Do not cover the is_valid_ether_addr() check under CONFIG_OF.
Unclear if this is an initial porting or a merging error before the
driver hit the FreeBSD src tree.
The end result was that we always got a random link-layer address,
while the individual drivers may have setup phy->macaddr and this
function would only overwride if given in device tree.
Only if both, driver and and the OF backup, fail then go and use
the random link-layer address.

While here adjust printing the random link-layer address using
a FreeBSD format specifier and not the unsupported Linux one.

Fixes:          6c92544d7c97
Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+6-3sys/contrib/dev/mediatek/mt76/eeprom.c
+6-31 files

FreeBSD/src 7d60647sys/compat/linuxkpi/common/src linux_80211_macops.c linux_80211.c

LinuxKPI: 802.11: make sure we are scheduled before wake_tx_queue()

If we are not scheduled before calling wake_tx_queue() packets may
never go out, which at first will look like EAPOL fails (as
wpa_supplicant suggest possibly with a wrong key).  Using monitor
mode it will be clear what is going on.
Pass a flag down to wake_tx_queue() to call ieee80211_schedule_txq()
in case (*wake_tx_queue)() is supported or not, which solves the
problem for the lkpi_80211_txq_tx_one() which was failing.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+8-2sys/compat/linuxkpi/common/src/linux_80211_macops.c
+4-4sys/compat/linuxkpi/common/src/linux_80211.c
+3-2sys/compat/linuxkpi/common/src/linux_80211.h
+15-83 files

FreeBSD/src 03f6b1fsys/modules/mt76 Makefile.inc, sys/modules/mt76/core Makefile

mt76: module Makefiles fix .PATH

The common Makefile.inc had the .PATH set for the common code.
That .PATH is only needed for the mt76_core module, which shares
code for all other drivers.  We leave the COMMONDIR variable defined
in Makefile.inc as we need it for CFLAGS+= -I for each driver but
migrate the .PATH to avoid drivers picking up the wrong files.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+0-2sys/modules/mt76/Makefile.inc
+2-0sys/modules/mt76/core/Makefile
+2-22 files

FreeBSD/src b129f79sys/contrib/dev/mediatek/mt76 usb.c, sys/contrib/dev/mediatek/mt76/mt7615 pci.c

mt76: sort out MODULE_DEPEND for PCI and USB

It is not enough to depend on mt76_core which then depends on linuxkpi
and linuxkpi_wlan.  Given each mt76 driver is its own module, each
also needs to depend on these linuxkpi modules.
In addition the core module usb part also has to depend on linuxkpi_usb.

This in addition to the previously sorted PCI drivers, allows (or will
allow) the individual chipsets (drivers) to load on systems with USB,
if compiled in, as well.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+7-0sys/contrib/dev/mediatek/mt76/mt7921/usb.c
+7-0sys/contrib/dev/mediatek/mt76/mt7925/usb.c
+3-0sys/contrib/dev/mediatek/mt76/usb.c
+1-1sys/contrib/dev/mediatek/mt76/mt7921/pci.c
+1-1sys/contrib/dev/mediatek/mt76/mt7615/pci.c
+1-1sys/contrib/dev/mediatek/mt76/mt7915/pci.c
+20-32 files not shown
+22-58 files

FreeBSD/src bc820edsys/contrib/dev/mediatek/mt76/mt7925 regd.c

mt76: mt7925: add missing LINUXKPI_PARAM_PREFIX

There is a module_param_named() in the file so we need to set
LINUXKPI_PARAM_PREFIX to get it a uniq sysctl name.  mt7921
has the exact same option.  Without their individual prefixes
the names would clash on systems with both chipsets and not
work for both.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+4-0sys/contrib/dev/mediatek/mt76/mt7925/regd.c
+4-01 files

FreeBSD/src 642c838sys/contrib/dev/mediatek/mt76 usb.c mt792x_usb.c

mt76: make USB compile

This is the mt76-specific changes to make the USB driver targets for
7921 and 7925 compile.

Sponsored by:   The FreeBSD Foundation
MFC after:      3 days
DeltaFile
+10-0sys/contrib/dev/mediatek/mt76/usb.c
+3-0sys/contrib/dev/mediatek/mt76/mt792x_usb.c
+13-02 files

FreeBSD/src 201fc8asys/modules/mt76 Makefile.inc, sys/modules/mt76/core Makefile

mt76: sort bus attachments in module Makefiles for pci and usb

With PCI enabled and USB still disabled add knobs to (i) enabled
them manually in the common Makefile.inc and (ii) add bus
attachment depend knobs where needed to enable them in individual
drivers.  For now the focus is in 7921 and 7925.

Sponsored by:   The FreeBSD Foundation
MFC atfer:      3 days
DeltaFile
+13-5sys/modules/mt76/mt7921/Makefile
+9-3sys/modules/mt76/mt7925/Makefile
+7-0sys/modules/mt76/core/Makefile
+6-0sys/modules/mt76/Makefile.inc
+35-84 files

FreeBSD/src 0ec952ashare/man/man5 src.conf.5

src.conf.5: Regen
DeltaFile
+1-7share/man/man5/src.conf.5
+1-71 files

FreeBSD/src 18721berelease/scripts pkg-stage.sh

release: Turn off debugging in pkg(8)

Running `pkg -d` in pkg-stage.sh results in multiple GB of network
traffic being written into the log files, which is less than helpful
when it comes to tracking down build failures.  Remove the -d flag.

MFC after:      5 days
X-MFC-note:     The code in 15 has diverged from 14, but the flag is
                there, just in a different place.
DeltaFile
+1-1release/scripts/pkg-stage.sh
+1-11 files

FreeBSD/src df3c9a8release/pkg_repos release-dvd.conf, release/scripts pkg-stage.sh

Revert "release: Ship firmware from kmods repo on DVD"

While all of the net/wifi-firmware-*-kmod packages are in the "kmod" pkg
repository, the net/wifi-firmware-kmod metapackage itself is not; this
results in the DVD build failing when it can't fetch that.

I'm not sure if the correct fix here is to add kmod-related metapackages
to the kmod repository (even if they themselves do not contain kmods) or
something else; but this needs to be backed out at least temporarily so
that 14.4-BETA1 can happen.

This reverts commit 8c1de31097763ce1d918a3f82c61fd8d30edbe75.

This is a direct commit to releng/14.4 since it is not yet clear whether
this should be permanently removed from other branches and there is no
urgency to do so (since DVD builds are disabled by default).

With hat:       re
Approved by:    re (cperciva)
DeltaFile
+7-18release/scripts/pkg-stage.sh
+0-7release/pkg_repos/release-dvd.conf
+7-252 files

FreeBSD/src bfd50a3sys/sys sysctl.h

sys/sysctl.h: Add missing <sys/kassert.h> include

Hopefully, 'sys/sysctl.h' is really self-contained now.

This fixes the GENERIC-NODEBUG compilation error in 'hwpstate_common.c'
after commit 804329587508 (see below).

Fixes:          1a446f765d9c ("sys/sysctl.h: Make it self-contained when included from the kernel")
Fixes:          804329587508 ("hwpstate{_amd,intel}(4): Move common knobs to a separate file")
Sponsored by:   The FreeBSD Foundation
DeltaFile
+1-0sys/sys/sysctl.h
+1-01 files

FreeBSD/src 21dd554sys/dev/e1000 igb_txrx.c

igb: remove M_HASHTYPE when RSS is not enabled

manually cherry-pick efcc0423d80e

Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D55143
DeltaFile
+1-1sys/dev/e1000/igb_txrx.c
+1-11 files

FreeBSD/src f592357sys/kern uipc_socket.c

sockets: repair sctp_peeloff(2)

The shim function soattach() may be passed a non-listening socket by SCTP.

NB: the change makes soattach() more hairy, but long term plan is that
this function goes away.

PR:     293010
Fixes:  64f7e3c9c178ab35cb1f8fdf791aec74ede6f6b2
DeltaFile
+9-3sys/kern/uipc_socket.c
+9-31 files

FreeBSD/src 70256d2sys/dev/qlnx/qlnxe qlnx_os.c ecore_l2.c

qlnxe: Overhaul setting the multicast MAC filters

When operating the multicast MAC filters, the current usage of
ECORE_FILTER_ADD and ECORE_FILTER_REMOVE are rather misleading.
ECORE_FILTER_ADD reads "adding new filter", but it actually removes
any existing filters and then addes a new one. ECORE_FILTER_REMOVE
reads "removing a filter", but it actually removes all filters.
Let's use ECORE_FILTER_REPLACE and ECORE_FILTER_FLUSH instead to
avoid confusion.

In the current implementation, only one MAC address is passed to
ecore_sp_eth_filter_mcast() and any previously installed filters are
removed, hence it breaks the multicast function. That can be observed
via either assigning new IPv6 addresses to the interface or putting
the interface as a member of lagg(4) interface with LACP aggregation
protocol. Fix that by calculating the multicast filter bins directly
from multicast MAC addresses and replace the filters every time
the bins changes.


    [18 lines not shown]
DeltaFile
+37-153sys/dev/qlnx/qlnxe/qlnx_os.c
+21-20sys/dev/qlnx/qlnxe/ecore_l2.c
+3-8sys/dev/qlnx/qlnxe/ecore_vf.c
+4-5sys/dev/qlnx/qlnxe/ecore_l2_api.h
+1-4sys/dev/qlnx/qlnxe/qlnx_def.h
+66-1905 files

FreeBSD/src 9686475sys/dev/qlnx/qlnxe qlnx_os.c

qlnxe: Allow tapping the TX packets

Currently only the packets in the RX path can be captured by tcpdump
as the ETHER_BPF_MTAP call in the TX path is missing. Add it so that
packets in both directions can be captured.

PR:             290973
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54891
DeltaFile
+1-0sys/dev/qlnx/qlnxe/qlnx_os.c
+1-01 files

FreeBSD/src 45b1718sys/dev/qlnx/qlnxe qlnx_os.c qlnx_def.h

qlnxe: Refactor setting the promiscuous and allmulti mode

There are two entry points to set the promiscuous and allmulti mode.
One is ioctl, and another is the init routine. Given they share almost
the identical logic, refactor a little to make the code more clear.

While here, for the ioctl, translate the error to EINVAL to avoid
confusing the net stack.

Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54890
DeltaFile
+38-46sys/dev/qlnx/qlnxe/qlnx_os.c
+0-1sys/dev/qlnx/qlnxe/qlnx_def.h
+38-472 files

FreeBSD/src ec7950fsys/modules/qlnx/qlnxev Makefile

qlnxev: Remove now unneeded include for opt_inet.h

Since the change [1], this is not required anymore.

This change partially reverts commit 8a847947153e.

[1] 4012b63889e4 qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl

Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54889
DeltaFile
+0-1sys/modules/qlnx/qlnxev/Makefile
+0-11 files

FreeBSD/src 4012b63sys/dev/qlnx/qlnxe qlnx_os.c, sys/modules/qlnx/qlnxe Makefile

qlnxe: Let ether_ioctl() handle SIOCSIFADDR ioctl

Since the change [1], the init routine qlnx_init() works as intended.
Let ether_ioctl() handle SIOCSIFADDR to simplify the code.

Combined with the change [1], this shall be a better fix for PR 287445.

[1] c10e6bc0f007 qlnxe: Avoid reinitializing the interface when it is already initialized

PR:             287445
Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54888
DeltaFile
+0-25sys/dev/qlnx/qlnxe/qlnx_os.c
+0-1sys/modules/qlnx/qlnxe/Makefile
+0-262 files

FreeBSD/src c10e6bcsys/dev/qlnx/qlnxe qlnx_os.c

qlnxe: Avoid reinitializing the interface when it is already initialized

qlnx_init_locked() unconditionally uninitialize the interface thus is
actually reinitializing the interface. Well the init routine qlnx_init()
is to initialize the interface by net stack when assigned with the first
inet or inet6 address. The ioctl SIOCSIFADDR for the first inet6 address
is handled by ether_ioctl() thus the interface is reinitialized no matter
it was initialized or not.

Add a driver status check for that to avoid reinitializing. Further plan
is removing SIOCSIFADDR ioctl from the driver and let ether_ioctl() handle
it.

Reviewed by:    kbowling
MFC after:      5 days
Differential Revision:  https://reviews.freebsd.org/D54887
DeltaFile
+2-1sys/dev/qlnx/qlnxe/qlnx_os.c
+2-11 files