OPNSense/src eb5aa52sys/net/route fib_algo.c

fib_algo(4): Lower level of algorithm switching messages to LOG_INFO

Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather
easy to trigger debug messages such as:
[fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to
radix4_lockless

Also, the "severity" of these events generally only justifies LOG_INFO
and not LOG_NOTICE.

Reviewed by:    melifaro

(cherry picked from commit ed81a15517b8a8f587fd7282c3690513bb798242)
DeltaFile
+1-1sys/net/route/fib_algo.c
+1-11 files

OPNSense/src 94d51c8sys/dev/wg if_wg.c

wg: Use ENETUNREACH when transmitting to a non-existent peer

The old errno value used is specifically for Capsicum and shouldn't be
co-opted in this way.  It has special handling in the generic syscall
layer (see syscallret()).  OpenBSD returns ENETUNREACH in this case;
let's do the same thing.

PR:             266712
Reviewed by:    kevans, imp
MFC after:      2 weeks
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D44582

(cherry picked from commit 63613e3ba1e188e9fece43e1613bd697f04b345e)
DeltaFile
+1-4sys/dev/wg/if_wg.c
+1-41 files

OPNSense/src 63f1e96sys/net debugnet.c

debugnet: Fix logging of frame length

MFC after:      1 week

(cherry picked from commit 6fe4d8395bc5ec51a5ec68b5f1176b4710676b7c)
(cherry picked from commit 800bd7da4c20ff0ad7b24879c03b1add4b583da7)
DeltaFile
+1-1sys/net/debugnet.c
+1-11 files

OPNSense/src 41beca8sys/net if_ethersubr.c

ethernet: Fix logging of frame length

Both the mbuf length and the total packet length are signed.

While here, update a stall comment to reflect the current practice.

Reviewed by:    kp
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D42390

(cherry picked from commit e7102929bf4fea4bf22855d2d6031edf6c413608)
(cherry picked from commit 4d65728d55a754f2529ca2cfb87c9588146563d0)
DeltaFile
+3-3sys/net/if_ethersubr.c
+3-31 files

OPNSense/src 9bab6a7sys/net if_bridge.c

MFC: if_bridge: change MTU for new members

Rather than reject new bridge members because they have the wrong MTU
change it to match the bridge. If that fails, reject the new interface.

PR:     264883
Different Revision:     https://reviews.freebsd.org/D35597

(cherry picked from commit 1865ebfb12ddaf3d0ff1458e6152b3cb1f1bdee8)
DeltaFile
+18-6sys/net/if_bridge.c
+18-61 files

OPNSense/src 124842dsys/net if_bridge.c

MFC: if_bridge: use IF_MINMTU

Replace incorrect constant 576 with IF_MINMTU to check for minimum MTU.
This unbreaks bridging tap interfaces with small mtu.

MFC after:      1 week
DeltaFile
+1-1sys/net/if_bridge.c
+1-11 files

OPNSense/src 01f62adsys/netpfil/ipfw ip_fw2.c

ipfw: Skip to the start of the loop when following a keep-state rule

When a packet matches an existing dynamic rule for a keep-state rule,
the matching engine advances the "instruction pointer" to the action
portion of the rule skipping over the match conditions.  However, the
code was merely breaking out of the switch statement rather than doing
a continue, so the remainder of the loop body after the switch was
still executed.  If the first action opcode contains an F_NOT but not
an F_OR (such as an "untag" action), then match is toggled to 0, and
the code exits the inner loop via a break which aborts processing of
the actions.

To fix, just use a continue instead of a break.

PR:             276732
Reviewed by:    jhb, ae
MFC after:      2 weeks

(cherry picked from commit 62b1faa3b7495de22a3225e42dabe6ce8c371e86)
DeltaFile
+1-2sys/netpfil/ipfw/ip_fw2.c
+1-21 files

OPNSense/src 0c801f3lib/libnetmap nmreq.c

libnetmap: remove interface name validation

When trying to use a VLAN device (e.g. "em0.123") with a dot
the library fails to parse the interface correctly. The former
pattern is much too restrictive given that almost all characters
can be coerced into a device name via ifconfig.

Remove the particularly restrictive validation.  Some characters
still cannot be used as an interface name as they are used as
delimiters in the syntax, but this allows to be able to use most
of them without an issue.

Submitted by:   franco at opnsense.org
Differential Revision:  https://reviews.freebsd.org/D42485
Reviewed by:    vmaffione

(cherry picked from commit ad874544d9f018bf8eef4053b5ca7b856c4674cb)
DeltaFile
+0-5lib/libnetmap/nmreq.c
+0-51 files

OPNSense/src 8c131c2sys/netpfil/pf if_pflog.c

pflog: log packet dropped by default rule with drop

Taken from: https://github.com/openbsd/src/commit/7b8683a1743e7
DeltaFile
+3-1sys/netpfil/pf/if_pflog.c
+3-11 files

OPNSense/src 8e4cc64libexec/getty gettytab

tty: patch in 3wire autologin support

PR: https://github.com/opnsense/core/issues/3921
DeltaFile
+18-0libexec/getty/gettytab
+18-01 files

OPNSense/src aad735csys/modules Makefile, sys/modules/apuled apuled.c Makefile

apuled: import APU 1-3 LED kernel module

Taken from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189772
PR: https://github.com/opnsense/core/issues/2114
DeltaFile
+686-0sys/modules/apuled/apuled.c
+4-0sys/modules/apuled/Makefile
+2-0sys/modules/Makefile
+692-03 files

OPNSense/src a4da898libexec/rc rc.subr, share/man/man8 rc.subr.8

rc: also run NAME_setup on NAME_reload

Reload is used for service reconfiguration as well
and lacks a NAME_prepend-like mechanism so it makes
sense to extend the NAME_reload hook into this
action.

precmd may use configuration checks and blocks setup
from doing its designated work (e.g. nginx). In moving
the invoke of the setup script in front allows us to
provide custom scripts for config file generation and
fixing prior to precmd checking configuration integrity.

Also introduce _run_rc_setup to separate the launcher
from the main one. Let it run correctly in the case
of restart_precmd and block further execution as
would be the case in start due to the internal plumbing
of restart being split into calling stop and start
afterwards.

    [2 lines not shown]
DeltaFile
+45-24libexec/rc/rc.subr
+10-3share/man/man8/rc.subr.8
+55-272 files

OPNSense/src b1b08cbsys/netinet ip_input.c, sys/netinet6 ip6_input.c in6.h

dummynet: passin after dispatch

Based on a patch originally found in m0n0wall, expanded
to IPv6 and aligned with FreeBSD's IP input path.

The limit may not be correctly accounted for on the WAN
interface due to dummynet counting the packet again even
though it was already processed.

The problem here is that there's no proper way to reinject
the packet at the point where it was previously removed
from so we make the assumption that ip input was already
done (including pfil) and more or less directly move to
packet output processing.

While here move the passin label up to take the extra check
but avoiding a second label.  Also remove the spurious tag
read for forward check since we don't use it and we should
really trust the mbuf flag.
DeltaFile
+12-2sys/netinet/ip_input.c
+11-3sys/netinet6/ip6_input.c
+6-0sys/netpfil/ipfw/ip_dn_io.c
+1-0sys/netinet6/in6.h
+30-54 files

OPNSense/src bbea95dbin/csh dot.cshrc, share/skel dot.cshrc dot.profile

etc: OPNsense customisations

o add more key bindings to .cshrc
o add .vimrc to base installation
o disable fortune cookie
DeltaFile
+16-0usr.bin/vi/dot.vimrc
+4-0bin/csh/dot.cshrc
+4-0share/skel/dot.cshrc
+4-0usr.bin/vi/Makefile
+1-1share/skel/dot.profile
+29-15 files

OPNSense/src 9dbfd67sys/fs/tmpfs tmpfs_subr.c

tmpfs: allow recurse as that does happen when using unionfs
DeltaFile
+1-1sys/fs/tmpfs/tmpfs_subr.c
+1-11 files

OPNSense/src 72593d8sys/dev/netmap netmap.c netmap_mem2.c

netmap: ring size limit not enough for multi-queue em(4)

Also mutes a spammy message.  Bravely going where no man
has gone before.  :)
DeltaFile
+1-1sys/dev/netmap/netmap.c
+1-1sys/dev/netmap/netmap_mem2.c
+2-22 files

OPNSense/src 3aa9a12usr.sbin/bsdinstall Makefile

usr.sbin/bsdinstall: OPNsense branding
DeltaFile
+1-1usr.sbin/bsdinstall/Makefile
+1-11 files

OPNSense/src 32b8a50usr.sbin/bsdinstall/partedit partedit_x86.c

bsdinstall: react to WORKAROUND_HYBRID to force UEFI install on BIOS boot
DeltaFile
+2-1usr.sbin/bsdinstall/partedit/partedit_x86.c
+2-11 files

OPNSense/src 2a66844sys/dev/sound/pci/hda hdacc.c

snd_hda: fix "duplicated free" on module unloading

This is trivial fix of hdacc_detach to avoid duplicated free on snd_hda
unloading.

The first try of detaching (kldunload) may results into "device busy" error,
but codec->fgs is freed by detach. Second try attempts to free codec->fgs again
and system panicks.

Here is example:

pcm0: unregister: channel pcm0:virtual:dsp0.vp0 busy (pid 3428)
pulseaudio[3428] [oss] module-oss.c: DSP shutdown.
pcm0: detached
hdaa0: detached
panic: Duplicate free of 0xfffff80412ee7d20 from zone 0xfffffe006bc0ba00
(malloc-32) slab 0xfffff80412ee7fc8(105)
cpuid = 6
time = 1712999565

    [24 lines not shown]
DeltaFile
+3-2sys/dev/sound/pci/hda/hdacc.c
+3-21 files

OPNSense/src 0a902d7sys/dev/sound/pci/hda hdac.c hdac.h

snd_hda: Add the full Intel Meteor/Arrow/Lunar Lake HD Audio PCI IDs

This is based off the Linux file sound/hda/intel-dsp-config.c.

Tested on:              Lenovo Thinkbook 16 G6+ IMH
MFC after:              3 days
Reviewed by:            markj, christos
Differential Revision:  https://reviews.freebsd.org/D44777
Sponsored by:           Postgres Professional

(cherry picked from commit 1dd1a696c58fb275aa0e01666d57861eeb51878d)
DeltaFile
+4-0sys/dev/sound/pci/hda/hdac.c
+4-0sys/dev/sound/pci/hda/hdac.h
+8-02 files

OPNSense/src 788987esys/dev/acpica acpi_battery.c

acpi_battery: avoid divide-by-zero when no devices have capacity info

On laptops with builtin batteries, disconnecting the battery may show up
as a battery without any capacity information. (The theory is that one
is disconnecting the cells but the electronics identifying the battery
are still connected.) As a result, the loop over all batteries in
acpi_battery_get_battinfo results in total_lfcap == 0.

So, just check that total_lfcap is non-zero to avoid a division by zero
(triggerable by sysctl hw.acpi.battery).

Reported by:    Stefano Marinelli
Tested by:      Stefano Marinelli
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D44818

(cherry picked from commit 2e850b832f5d2adb9b230d191277d67c00caaab9)
DeltaFile
+8-1sys/dev/acpica/acpi_battery.c
+8-11 files

OPNSense/src 7a2c259sys/conf newvers.sh, usr.bin/yacc config.h

14.1: update stable/14 to -PRERELEASE

This marks the start of the FreeBSD 14.1 release cycle; the stable/14
tree is now in "code slush".

Developers are encouraged to prioritize fixing bugs (and/or merging bug
fixes from HEAD) over new features at this time.  Commit approval from
re@ is not required but if new features introduce problems they may be
removed from the release.

Approved by:    re (implicit)
DeltaFile
+2-2sys/conf/newvers.sh
+1-1usr.bin/yacc/config.h
+3-32 files

OPNSense/src 954bb76sys/net/route fib_algo.c

fib_algo(4): Lower level of algorithm switching messages to LOG_INFO

Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather
easy to trigger debug messages such as:
[fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to
radix4_lockless

Also, the "severity" of these events generally only justifies LOG_INFO
and not LOG_NOTICE.

Reviewed by:    melifaro

(cherry picked from commit ed81a15517b8a8f587fd7282c3690513bb798242)
DeltaFile
+1-1sys/net/route/fib_algo.c
+1-11 files

OPNSense/src c8aac78share/man/man3 assert.3

assert.3: Update manual page based on mandoc -Tlint

Execute the mandoc -Tlint option on assert(3). This results in two areas
of updates:

Remove invalid Rs block
Remove invalid Re block

Reviewed by:    mhorne
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1132

(cherry picked from commit 3f72f36cf2f92e00a248f729d50803232ff4cef8)
DeltaFile
+0-4share/man/man3/assert.3
+0-41 files

OPNSense/src d16abffshare/man/man9 bhnd_erom.9

bhnd_erom.9: remove self-reference

Change .Xr to .Fn, which quiets a mandoc warning.

Reviewed by:    mhorne
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1135

(cherry picked from commit 81727a3dd38287d437d1e7e416dd89107a706e55)
DeltaFile
+1-1share/man/man9/bhnd_erom.9
+1-11 files

OPNSense/src ac3bd59share/man/man4 cfumass.4

cfumass.4: remove self-reference

Change .Xr to .Nm, which quiets a mandoc warning.

Reviewed by:    mhorne
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1135

(cherry picked from commit f8ce29b63181912e01625addb47168e987d9bbed)
DeltaFile
+1-1share/man/man4/cfumass.4
+1-11 files

OPNSense/src 7f1fc5dsbin/mdmfs mdmfs.8

mount_mfs.8: remove self-reference

Change .Xr instances to .Nm, which quiets several mandoc warnings.

Reviewed by:    mhorne
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1135

(cherry picked from commit 2ebc7806a1e4f4cd82a21a123ee5078ca6c4b113)
DeltaFile
+5-5sbin/mdmfs/mdmfs.8
+5-51 files

OPNSense/src ac4ddd8lib/libc/sys open.2

open.2: remove self-reference

Change .Xr reference to .Fn, which quiets a mandoc warning.

Reviewed by:    mhorne
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1135

(cherry picked from commit d3de1bd429bc51fbbcb37fadaf2581461edf848b)
DeltaFile
+1-1lib/libc/sys/open.2
+1-11 files

OPNSense/src de436a4share/man/man9 device_add_child.9

device_add_child.9: remove self-reference

Change .Xr to .Nm, which quiets a mandoc warning

Reviewed by:    mhorne
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1135

(cherry picked from commit f9ea7b6e8253273ebb1023c4380a305e6d3cf02b)
DeltaFile
+2-2share/man/man9/device_add_child.9
+2-21 files

OPNSense/src 929d8efshare/man/man9 KASSERT.9

KASSERT(9): add assertion message guidelines

Add some text describing how to create useful assertion messages.
Improve and add to the EXAMPLES.

See the discussion prompting this on -hackers:
https://mail-archive.freebsd.org/cgi/mid.cgi?57o4rnnq-013s-3nsn-59n5-4ssn1pq81s94

Reviewed by:    emaste
Discussed with: imp, bz
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D44434

(cherry picked from commit 83a426d13a6a384e63e75d8252c03dd40af3817e)
DeltaFile
+67-5share/man/man9/KASSERT.9
+67-51 files