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)
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)
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)
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
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)
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)
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]
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.
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]
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)
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)
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)
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)
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)