Commit graph

291895 commits

Author SHA1 Message Date
Ed Maste
5a7daf0199 blocklistd: Remove obsolete network class reference
This was a comment in a configuration example.

Reported by:	bapt
Reviewed by:	bapt, jlduran
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48810

(cherry picked from commit 513c4e20790a24526cb1c2f5a4725971a09d928a)
2025-02-07 10:56:56 -05:00
Ed Maste
707adc335e jls.8: Reference correct manpage for libxo options
PR:		284135
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 90670e0e275c6e36fc7e14368fc4e3e7f1d3671d)
2025-02-07 10:56:56 -05:00
Andrew Gallatin
d942e2828c mlx5en: Fix SIOCSIFCAPNV
In 4cc5d081d8c23, a change was introduced that manipulated
drv_ioctl_data->reqcap using IFCAP2 bits.  This was noticed
when creating a mixed lagg with mce0 and ixl0 caused the
interfaces' txcsum caps to be disabled.

Fixes: 4cc5d081d8c23
Reviewed by: glebius
Sponsored by: Netflix
MFC After: 7 days

(cherry picked from commit 36fdc42c6a4c828d334471438c4f852e4b5a25e2)
2025-02-07 10:31:40 -05:00
Mark Johnston
794283f94b thread: Add a missing include of asan.h
I didn't notice this during testing because invariants-enabled kernels
implicitly include asan.h via kassert.h.

Reported by:	Lexi Winter <lexi@le-Fay.org>
Fixes:		800da341bc4a ("thread: Simplify sanitizer integration with thread creation")

(cherry picked from commit 7a7063cc54274a44192fb65c71360a5e72c171b9)
2025-02-07 14:46:53 +00:00
Mark Johnston
0db4588bbe thread: Simplify sanitizer integration with thread creation
fork() may allocate a new thread in one of two ways: from UMA, or cached
in a freed proc that was just allocated from UMA.  In either case, KASAN
and KMSAN need to initialize some state; in particular they need to
initialize the shadow mapping of the new thread's stack.

This is done differently between KASAN and KMSAN, which is confusing.
This patch improves things a bit:
- Add a new thread_recycle() function, which moves all kernel stack
  handling out of kern_fork.c, since it doesn't really belong there.
- Then, thread_alloc_stack() has only one local caller, so just inline
  it.
- Avoid redundant shadow stack initialization: thread_alloc()
  initializes the KMSAN shadow stack (via kmsan_thread_alloc()) even
  through vm_thread_new() already did that.
- Add kasan_thread_alloc(), for consistency with kmsan_thread_alloc().

No functional change intended.

Reviewed by:	khng
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D44891

(cherry picked from commit 800da341bc4a35f4b4d82d104b130825d9a42ffa)
2025-02-07 14:46:53 +00:00
Stéphane Rochoy
546b910adb savecore: add a test for LOG_PERROR
Signed-off-by: Stéphane Rochoy <stephane.rochoy@stormshield.eu>

Reviewed by:	markj, oshogbo
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1546

(cherry picked from commit 3dc18af5770f9fc820343021d63dfc4cf09d9906)
2025-02-07 14:46:53 +00:00
FUKAUMI Naoki
703c6df052 ure(4): Add support for ELECOM EDC-QUA3C
ELECOM EDC-QUA3C is a USB3.1 Gen1 Type-A/C 2.5GBASE-T network adapter.
This also works as a cdce(4) device by:

usbconfig -d X.Y set_config 1
  or
usbconfig -d X.Y set_config 2

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>

MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1578

(cherry picked from commit dc273058cb0b6bef075e77272afc66f1a1fd3889)
2025-02-07 14:46:53 +00:00
Stéphane Rochoy
dff74bbdd0 savecore: add missing call to cap_openlog when in capabilities mode
Signed-off-by: Stéphane Rochoy <stephane.rochoy@stormshield.eu>

Reviewed by:	markj, oshogbo
MFC after:	2 weeks
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1546

(cherry picked from commit c901e89d8e467b56f844ab5dba18dc20d503c2be)
2025-02-07 14:46:53 +00:00
Mark Johnston
bd8c494343 dtrace: Use size_t instead of uintptr_t to represent buffer offsets
This eases porting of DTrace to CHERI, where uintptr_t and size_t aren't
interchangeable.

No functional change intended.

Reviewed by:	Domagoj Stolfa <domagoj.stolfa@gmail.com>
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D48625

(cherry picked from commit ba9cff7aa2eb62d84bead503cd606d1586ea8388)
2025-02-07 14:46:53 +00:00
Mark Johnston
af5c7b110f bhyve: Implement the libslirp notify callback
libslirp can invoke a callback when received data is removed from a
socket buffer, generally because the guest ACKed some data.  Previously
it didn't do anything, but it needs to wake up the poll thread to get
reasonable throughput.

Suppose one is using scp to copy data into a guest filesystem via the
slirp backend.  Data is received on libslirp's socket, which we poll for
data in slirp_pollfd_td_loop().  That data gets buffered in priv->pipe,
and eventually is placed in the device model's RX rings by the backend's
mevent handler.  When implementing TCP, libslirp holds on to a copy of
data until it's ACKed by the guest via slirp_send(), at which point it
drops that data and invokes the notify callback.

The initial implementation of this backend didn't take into account the
fact that slirp_pollfds_fill() will not add libslirp's socket to the
pollfd set if more than a threshold amount of data is already buffered.
Then poll() needs to time out before the backend sends more data to the
guest.  With a default timeout of 500ms, this kills throughput.

Use a pipe to implement a simple in-band signal to the poll thread so
that it reacts quickly when more buffer space becomes available.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D48192

(cherry picked from commit 20a51e6073f488440e108c7c628231cd6ae6757e)
2025-02-07 14:46:53 +00:00
Mark Johnston
f34a651bc9 bhyve: Use a non-blocking read in slirp_recv()
When using the slirp backend with the e1000 frontend, I otherwise get
hangs in readv(), caused by the e1000 emulation not checking whether
bytes are available before trying to read them.  In particular, that
device model expects the recv callback to return 0 if no bytes are
available, and with slirp it would end up blocking forever.  The virtio
device model uses the peek_recvlen to check first, so I didn't notice
the problem when implementing the slirp backend.

Make the slirp backend more flexible to accommodate e1000.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D48164

(cherry picked from commit d3bdfa583044dbfb76ef777939b86bb68baebee7)
2025-02-07 14:46:53 +00:00
Mark Johnston
028323d616 setfib.2: Note that the number of FIBs can be adjusted after boot
Reviewed by:	zlei, imp
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D48545

(cherry picked from commit 010ee8215f5c899e23250828402af5b7bb354328)
2025-02-07 14:46:53 +00:00
Bjoern A. Zeeb
618afeb7f3 LinuxKPI 802.11 / rtw88: make packets flow again
In 886653492945f we added checks for packets to only go out if the
station is known to the firmware (amongst others) as there are
implications in drivers.
Unfortunately rtw88 does not support the mac80211 (*sta_state)() KPI
but only the fallback (*sta_add/remove)() in which case the station is
only added to firmware when going from AUTH to ASSOC.  That means we
had no chance to get authenticated anymore.

PR:	283142, 274382
Fixes:	886653492945f (make sure we can send DISASSOC or DEAUTH frames)
Tested by:	imb protected-networks.net, oleg.nauman gmail.com
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48161

(cherry picked from commit 2372f8cc640c2f4ab82831e6ac0e27ab6c18321a)
2025-02-06 20:52:42 +00:00
Kirk McKusick
5572827428 Defer the January 19, 2038 date limit in UFS1 filesystems to February 7, 2106
Standardize the definition of a UFS dinode

Differential Revision: https://reviews.freebsd.org/D48472

(cherry picked from commit 1111a44301da39d7b7459c784230e1405e8980f8)
(cherry picked from commit aa90fbed151de512ab6e59f75df009533a15751f)
(cherry picked from commit 256389eaf158acaf67f0530764be8af68edee78c)
(cherry picked from commit 6cd973d903c8f214d84daf91eb75047631bf1618)
(cherry picked from commit e1ebda4458bbaf7d85fb803e20f3afc5441f24d9)
2025-02-06 11:25:09 -08:00
Zhenlei Huang
2e4eaf3c13 ifnet: Detach BPF descriptors on interface vmove event
When an interface is moving to/from a vnet jail, it may still have BPF
descriptors attached. The userland (e.g. tcpdump) does not get noticed
that the interface is departing and still opens BPF descriptors thus
may result in leaking sensitive traffic (e.g. an interface is moved
back to parent jail but a user is still sniffing traffic over it in
the child jail).

Detach BPF descriptors so that the userland will be signaled.

Reviewed by:	ae
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D45727

(cherry picked from commit 1ed9b381d4701fc9f66741256e93b96e22273217)

ifnet: Fix build without BPF

The newly introduced function bpf_ifdetach() is only available when
device bpf is enabled.

Fixes:	1ed9b381d470 ifnet: Detach BPF descriptors on interface vmove event
(cherry picked from commit d8413a1c3ba235a79ae6b8cc35767a861855c7e2)
2025-02-07 02:37:01 +08:00
Zhenlei Huang
700880a135 ifnet: Make if_detach_internal() and if_vmove() void
if_detach_internal() never fail since change [1]. As a consequence,
also does its caller if_vmove(). While here, remove a stall comment.

No functional change intended.

This reverts commit c7bab2a7ca.

[1] a779388f8b if: Protect V_ifnet in vnet_if_return()

Reviewed by:	glebius
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D48820

(cherry picked from commit bb0348a17974d83671becbd32ea0e4bd2ea61906)
2025-02-07 02:35:54 +08:00
Zhenlei Huang
56c9385903 bpf: Fix potential race conditions
There're two possible race conditions,

1. Concurrent bpfattach() and bpf_setif(), i.e., BIOCSETIF ioctl,
2. Concurrent bpfdetach() and bpf_setif().

For the first case, userland may see BPF interface attached but it has
not been in the attached interfaces list `bpf_iflist` yet. Well it
will eventually be so this case does not matter.

For the second one, bpf_setif() may reference `dead_bpf_if` and the
kernel will panic (spotted by change [1], without the change we will
end up silently corrupted memory).

A simple fix could be that, we add additional check for `dead_bpf_if`
in the function `bpf_setif()`. But that requires to extend protection
of global lock (BPF_LOCK), i.e., BPF_LOCK should also protect the
assignment of `ifp->if_bpf`. That simple fix works but is apparently
not a good design. Since the attached interfaces list `bpf_iflist` is
the single source of truth, we look through it rather than check
against the interface's side, aka `ifp->if_bpf`.

This change has performance regression, that the cost of BPF interface
attach operation (BIOCSETIF ioctl) goes back from O(1) to O(N) (where
N is the number of BPF interfaces). Well we normally have sane amounts
of interfaces, an O(N) should be affordable.

[1] 7a974a649848 bpf: Make dead_bpf_if const

Fixes:		16d878cc99 Fix the following bpf(4) race condition ...
MFC after:	4 days
Differential Revision:	https://reviews.freebsd.org/D45725

(cherry picked from commit 7def047a1ae93b3b10bd57ed1bd28e861f94b596)
2025-02-07 02:35:11 +08:00
Zhenlei Huang
8d5d7e2ba3 sysctl: Teach sysctl to attach and run itself in a jail
This allows the parent jail to retrieve or set kernel state when child
does not have sysctl(8) installed (e.g. light weighted OCI containers
or slim jails).

This is especially useful when manipulating jail prison or vnet sysctls.
For example, `sysctl -j foo -Ja` or `sysctl -j foo net.fibs=2`.

Reviewed by:	dfr (previous version), markj
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D48618

(cherry picked from commit 08aa7128dea4d14811ae4a0225d7c678869cfe62)
2025-02-06 23:38:04 +08:00
Zhenlei Huang
4ef48d172b sysctl: Refactor function parsefile()
Let the caller open the file and pass in the file handler. This can
benefit an upcoming change so that we will have cleaner logic.

No functional change intended.

Suggested by:	markj
MFC after:	1 week

(cherry picked from commit 6193855fc76c591ffabe6168cd674e6ec0dafa8e)
2025-02-06 23:38:04 +08:00
Zhenlei Huang
b709f7b38c ip6addrctl(8): Teach ip6addrctl to attach and run itself in a jail
This will make it easier to manage address selection policies of vnet
jails, especially for those light weighted OCI containers or slim jails.

Requested by:	dfr
Reviewed by:	dfr, markj
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D48679

(cherry picked from commit 6dcdd79a251b5e62ff9ce562ad451e92dec39408)
2025-02-06 23:38:04 +08:00
Zhenlei Huang
99bcb54d8d ip6addrctl(8): Strictly check the number of arguments
The additional arguments are useless but may tempt user a wrong usage.

Reviewed by:	dfr
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48701

(cherry picked from commit 13ce55b66fad2b2b4054a89a1a906f58dc33683b)
2025-02-06 23:38:03 +08:00
Warner Losh
2a777f2030 ota: Merge One True Awk 20250116 bsd-feature 2dce54b053d4
Jan 14, 2025
	Fix incorrect error line number issues. unput has
	no business managing lineno. Thanks to Ozan Yigit.

Jan 05, 2025
	Fix hex detection in is_valid_number.
	Fix indirect field specification with non-numeric string
	eg. $("foo") in indirect. This is not illegal.
	Thanks to Arnold Robbins.

Jan 01, 2025
	Fixed openfile to not try to read from a directory.
	Thanks to Arnold Robbins.

Sponsored by:		Netflix

(cherry picked from commit dd78d987cb38ef162d40aad86229f1dc19884f78)
2025-02-06 08:10:46 -07:00
Colin Percival
1dbcd9a15c vmimage.subr: Redirect etcupdate log to stdout
While we're here, send the etcupdate log from generating base.txz
to stdout instead of /dev/null (see e972e408d19a) as well.

Reviewed by:	emaste, gordon, jrtc27
MFC after:	1 week
Sponsored by:	Amazon
Differential Revision:	https://reviews.freebsd.org/D48719

(cherry picked from commit ace4637ee0c666c6f5a1c664f8956f7302234edd)
2025-02-05 20:14:21 -08:00
Michael Tuexen
f284154896 TCP BBR: remove dead code
No functional change intended.

Reviewed by:		Peter Lei, rrs (earlier version)
CID:			1523802
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48341

(cherry picked from commit e7fbf52a3e38c4bc4249e6541fe7e42ecc119656)
2025-02-05 11:04:01 +01:00
Michael Tuexen
0cc48e6317 TCP RACK: don't log an uninitialized value
reduce is uninitialized, if the code path for logging is reached via
goto old_method;.

Reviewed by:		rrs, Peter Lei
CID:			1557359
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48346

(cherry picked from commit 4c89d59e0cdac4d83fb5841aefae9214545b2273)
2025-02-05 11:00:04 +01:00
Michael Tuexen
992f67691a TCP RACK: fix TCP_RACK_PACING_BETA socket option
Bring back the code, which was accidentally removed. While there,
indent a comment correctly.

Reviewed by:		rrs
CID:			1540026
Fixes:			e18b97bd63a8 ("Update to bring the rack stack with all its fixes in.")
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48340

(cherry picked from commit e8ec28047df5185582a95c5211ed75682fad5ec5)
2025-02-05 10:58:12 +01:00
Michael Tuexen
c6f745a3e3 TCP BBR: remove dead code
No functional change intended.

Reviewed by:		rrs
CID:			1523808
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48338

(cherry picked from commit 061727efe1e355fb2fde1b05e92718543d05bfe7)
2025-02-05 10:56:52 +01:00
Michael Tuexen
2a704e9ca7 TCP BBR: remove dead code
bw is unsigned and not zero. So it cannot be smaller than 1.
No functional change intended.

Reviewed by:		rrs, cc
CID:			1523791
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48323

(cherry picked from commit c28fefe1dc44b69743dd18d038440da38a2867a7)
2025-02-05 10:55:36 +01:00
Michael Tuexen
86ec7e524a TCP RACK: fix TCP fast open
Do not jump to a place in the code, which requires several variables
to be set (segsize, minseg, idle, len, sb_offset), which is not true.
To avoid using these variables, start the HPTS timer explicitly.
This fix only applies to the client side using TCP fast open.

Approved by:		rrs
CID:			1523766
CID:			1523770
CID:			1523786
CID:			1523801
CID:			1523809
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48322

(cherry picked from commit bb9525f30214e8b6c53c6cccd9e8f02e8f8e8c42)
2025-02-05 10:54:19 +01:00
Michael Tuexen
1d8bbe5ba3 TCP RACK: remove variable with is only initialized and not changed
minslot is initialized to 0 and never changed. It is not clear to me
under which condition minslot should be set to which value.
Therefore, remove it and the code checking that it is not zero.
No functional change intended.

Reviewed by:		rrs
CID:			1523812
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48321

(cherry picked from commit 84e894ce1309b426aa5d1a20ec194401f35dc478)
2025-02-05 10:52:35 +01:00
Michael Tuexen
6ab740bc90 TCP BBR: remove code which is not needed
rc_bbr_substate is a 3-bit unsigned int, so it can't be larger than
or equal to 8. The wrap around already happens.
No functional change intended.

Reviewed by:		rrs
CID:			1523795
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48320

(cherry picked from commit 4bce1a19fcfac0c9f22c11278daa510546ccd3f2)
2025-02-05 10:50:55 +01:00
Michael Tuexen
2632e532c4 TCP BBR: simplify expression
There is no need to check partially for bbr->r_ctl.crte being NULL,
since this can't be true in this path.
No functional change intended.

Reviewed by:		rrs
CID:			1523810
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48312

(cherry picked from commit 305c40dc552f9c150eacce95c181798031368cd9)
2025-02-05 10:49:42 +01:00
Michael Tuexen
221ac9e078 TCP RACK: remove code that cannot be reached
No functional change intended.

Reviewed by:		rrs
CID:			1523797
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48301

(cherry picked from commit 41af5eeefc2c11d0e301f9f4476ba50214a8a584)
2025-02-05 10:47:30 +01:00
Michael Tuexen
c178bc1934 TCP BBR: fix integer overflow
Use 64-bit arithmetic.

Reviewed by:		rrs
CID:			1523806
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48302

(cherry picked from commit 88766e7af52bbde32b14ad48fb76798a3ba4650c)
2025-02-05 10:46:22 +01:00
Michael Tuexen
c3322bb468 TCP BBR: simplify expression
rsm cannot be NULL, when calling bbr_update_bbr_info().
So no need to check partially for it. No functional change intended.

Reviewed by:		rrs
CID:			1523803
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48293

(cherry picked from commit 4173a3a009a42c47f1ec2d1cbfb99347aaf195da)
2025-02-05 10:45:17 +01:00
Michael Tuexen
53da007da1 TCP RACK: remove un-needed assignment
No functional change intended.

Reviewed by:		rrs
CID:			1523768
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48292

(cherry picked from commit deb4252e9e7c8d2eca9be6333caa434061f3f594)
2025-02-05 10:41:26 +01:00
Michael Tuexen
6aa2c8ed5e TCP RACK: simplify condition
It is already known that rsm != NULL, so no need to check for it.

Reviewed by:		rrs
CID:			1523815
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48282

(cherry picked from commit 8471791eb6eeedaedd4d70e1076cfd143bf12fca)
2025-02-05 10:39:15 +01:00
Michael Tuexen
3f45a8ffad TCP BBR: do not log an uninitialized value
Reviewed by:		rrs
CID:			1523789
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48281

(cherry picked from commit c7e81cc04369dd7bdd00519109efe9d75f53375c)
2025-02-05 10:37:35 +01:00
Michael Tuexen
080caa0aea TCP RACK: avoid using uninitialized tot_idle variable
Reviewed by:		rrs
CID:			1540027
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48277

(cherry picked from commit 3b9da3dcd11f3d73281383c4ba383a4fcc4b9bbe)
2025-02-05 10:33:29 +01:00
Michael Tuexen
8a246cebc1 TCP BBR: remove code which is never executed
USEC_2_TICKS() returns at least 1.

Reviewed by:		rrs
CID:			1523775
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D4827

(cherry picked from commit 1781324db2bc22a971a33c5a063036b2775055c6)
2025-02-05 10:32:16 +01:00
Michael Tuexen
8ef4a2cfb3 TCP BBR: fix condition when sending a tail loss probe
Reviewed by:		rrs
CID:			1523793
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48274

(cherry picked from commit 5ec914e06c96ff40bf0e6567359c0de039b59ed2)
2025-02-05 10:31:01 +01:00
Michael Tuexen
3520068b47 TCP RACK: add comment
Indicate that the missing of the break is intentionally.

Reviewed by:		rrs
CID:			1523782
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48273

(cherry picked from commit 0ce13b1d580f05f96e3d85afb0824f672cb0c7a2)
2025-02-05 10:29:28 +01:00
Michael Tuexen
b638491bb8 TCP BBR: fix getsockopt() for TCP_BBR_USEDEL_RATE
Actually implement the IPPROTO_TCP-level socket option
TCP_BBR_USEDEL_RATE.

Reviewed by:		rrs
CID:			1523813
CID:			1523814
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48261

(cherry picked from commit b47dcb4b1ff16e6af2e07798f6fe06580b4eddf0)
2025-02-05 09:53:05 +01:00
Michael Tuexen
8d5e624d8d TCP RACK: don't use an uninitialized variable
When storing the old beta values in rack_swap_beta_values(),
ensure that the newreno_flags field is initialized appropriately
instead of using an uninitialized value.
Since the stored newreno_flags aren't actually used, this fix
should not have any functional change.

Reviewed by:		rrs
CID:			1523796
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48260

(cherry picked from commit 4f3a0c719780fdd57c660ceb353bbc71fc555600)
2025-02-05 09:50:40 +01:00
Michael Tuexen
dd0d5ece19 TCP RACK, BBR: cleanup of ctf_process_inbound_raw()
Instead of dealing with ifp == NULL, which should never happen,
assume that this is not true. Use KASSERT to make this clear.
No functional change intended.

Reviewed by:		glebius, rrs
CID:			1523767
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48258

(cherry picked from commit 4940584bbf0b809130f6ac1a7a0c6b00d373af1e)
2025-02-05 09:44:19 +01:00
Michael Tuexen
0da0b392e2 TCP RACK, BBR: ensure return value is always ininitialized
Do not return an uninitialized value from ctf_do_queued_segments()
in case no packets are actually processed (all are skipped).

Reviewed by:		rrs
CID:			1523774
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48217

(cherry picked from commit b5739c8b12226c791bc8e7a4ac6e48965333509a)
2025-02-05 09:42:51 +01:00
Michael Tuexen
b9c89008cc TCP RACK: remove redundant check
No functional change intended.

Reviewed by:		rrs
CID:			1523811
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48216

(cherry picked from commit 16e8e99f1d412103d8f42e5ed740555c545bffc5)
2025-02-05 09:39:26 +01:00
Michael Tuexen
8ed1a0c911 TCP BBR: remove assignments without effect
No functional change intended.

Reviewed by:		rrs
CID:			1523772
CID:			1523777
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48215

(cherry picked from commit 895347fc10c5b06bddadcc2937fdcf298c7e1114)
2025-02-05 09:36:39 +01:00
Michael Tuexen
6b8b104727 icmp: improve INVARIANTS check
Actually check the conditions that are enforced by the error checking
code instead of a condition which is
* checking a number to be non-negative instead of positive
* depending on a random number
Perform the checks consistently for ICMPv4 and ICMPv6.

Reviewed by:		glebius, rrs, cc
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48001

(cherry picked from commit c9febea3dc8ac8e308e8fc5a2e74dd0313fdc5d2)
2025-02-05 08:58:54 +01:00
Michael Tuexen
c8bd4684eb icmp.4: improve icmplim and add icmplim_jitter description
Reviewed by:		cc, bcr
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D48025

(cherry picked from commit eba715c544ea89c6b402c55e03b388b77030b997)
2025-02-05 08:37:10 +01:00