Commit graph

1775 commits

Author SHA1 Message Date
Kristof Provost
485bd16308 pf: cope with SCTP port re-use
Some SCTP implementations will abort connections and then later re-use the same
port numbers (i.e. both src and dst) for a new connection, before pf has fully
purged the old connection.

Apply the same hack we already have for similarly misbehaving TCP
implementations and forcibly remove the old state so we can create a new one.

MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 82e021443a)
2024-08-27 10:09:10 +02:00
Christos Margiolis
6ab8b418dc sound tests: Add SNDSTIOC_ADD_USER_DEVS test
Test whether the SNDSTIOC_ADD_USER_DEVS IOCTL (registers a userland
device to /dev/sndstat) works properly.

Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch
Differential Revision:	https://reviews.freebsd.org/D46228

(cherry picked from commit 2668e76d6e)
2024-08-26 16:52:02 +03:00
Kristof Provost
09d61b28a0 vnet tests: verify that we can load if_epair and if_bridge
We're going to start running many of the vnet tests in nested jails (so they
can run in parallel). That means the tests won't be able to load kernel modules,
which we commonly do for if_epair and if_bridge.

Just assume that all vnet tests need this, because so many of them do that we
don't want to manually annotate all of them.
This is essentially a no-op on non-nested tests.

Do the same for the python test framework.

While here also have pflog_init actually call pft_init. While having pflog
loaded implies we have pf too pft_init also checks for vimage support, and now
for if_epair.

Reviewed by:	markj
MFC after:	1 month
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D46039

(cherry picked from commit ae8d588140)
2024-08-22 21:01:33 +02:00
Kristof Provost
145f5005ae pf tests: ensure temporary files end up in the atf working directory
Many of the tests create temporary files. pid files, log files, tcpdump
captures, ... We should take care to ensure they're stored in the temporary
working directory Kyua creates rather than in the root directory.

This ensures there are no conflicts between simultaneously running tests, and
also keeps the root directory clean.

MFC after:	1 month
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit b0fcf4d522)
2024-08-22 21:01:33 +02:00
Kristof Provost
46c4fc50d3 pf: invert direction for inner icmp state lookups
(e.g. traceroute with icmp)
ok henning, jsing

Also extend the test case to cover this scenario.

PR:		280701
Obtained from:	OpenBSD
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 89f6723288)
2024-08-20 17:15:10 +02:00
Kristof Provost
3455a02b5a pf tests: ensure that traceroutes using ICMP work
PR:		280701
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 34063cb714)
2024-08-20 17:15:10 +02:00
Mark Johnston
58f9c14235 ktrace tests: Add a test case for handling of exec+setuid binaries
MFC after:	1 week

(cherry picked from commit 3852a5a226)
2024-08-15 14:29:49 +00:00
Mark Johnston
cb2657c962 netinet6 tests: Add a regression test for default router handling
This serves as a regression test for commit a48df53e42.

Reviewed by:	bz, allanjude
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Bell Tower Integration
Differential Revision:	https://reviews.freebsd.org/D46136

(cherry picked from commit feda329622)
2024-08-08 19:11:34 +00:00
Ed Maste
f06d322e9d Remove "All Rights Reserved" from FreeBSD Foundation copyrights
These ones were unambiguous cases where the Foundation was the only
listed copyright holder.

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 5c2bc3db20)
2024-08-06 15:39:53 -04:00
Mark Johnston
014b6c341d ktrace tests: Add a missing mode in open(O_CREAT)
MFC after:	1 week

(cherry picked from commit 9cc67e4361)
2024-08-06 16:40:51 +00:00
Kristof Provost
3e1f815655 pf tests: ensure we don't confuse different ICMP types
When creating a state for ICMP (v4 or v6) packets we only used the ID, which
means that we could confuse different ICMP types. For example, if we allowed
neighbour discovery but not ICMPv6 echo requests an ND packet could create a
state that the echo request would match.

Test that this is now fixed.

Reported by:	Enrico Bassetti <e.bassetti@tudelft.nl>
MFC after:	1 day
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit b9f0dbc3d0)
2024-07-31 09:39:53 +02:00
Mark Johnston
bed96ef09d socket tests: Serialize sonewconn_overflow
It relies on being able inspect the dmesg buffer to see whether the
kernel logged certain messages.  If it's interleaved with tests that
generate large amounts of console output (e.g., GELI tests), then it can
fail spuriously.

MFC after:	2 weeks

(cherry picked from commit ab27e232b1)
2024-07-30 15:55:32 +00:00
Mark Johnston
fb8670d3f8 gnop tests: Serialize
Some of these tests make use of test disk devices, but then they can't
run in parallel.

MFC after:	2 weeks

(cherry picked from commit dc8357de60)
2024-07-30 15:55:32 +00:00
Christos Margiolis
22be802cf8 sound tests: Add sndstat nvlist ATF test
Sponsored by:	The FreeBSD Foundation
MFC after:	2 days
Reviewed by:	dev_submerge.ch, markj
Differential Revision:	https://reviews.freebsd.org/D45901

(cherry picked from commit 95eb4b873b)
2024-07-29 18:34:54 +03:00
Kristof Provost
4f5440f2ab pf tests: fix sctp:timeout test
The test body somehow wound up in the cleanup function.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit fe0c82a603)
2024-07-25 10:23:31 +02:00
Kristof Provost
5acd8ff566 pf tests: test setting and retrieving timeout values
(cherry picked from commit 8ed5170c66)
2024-07-25 10:23:29 +02:00
Mark Johnston
b14a491283 ktls: Fix races that can lead to double initialization
ktls_enable_rx() and ktls_enable_tx() have checks to return EALREADY if
the socket already has KTLS enabled.  However, these are done without
any locks held and nothing blocks concurrent attempts to set the socket
option.  I believe the worst outcome of the race is leaked memory.

Fix the problem by rechecking under the sockbuf lock.  While here, unify
the locking protocol for sb_tls_info: require both the sockbuf and
socket I/O locks in order to enable KTLS.  This means that either lock
is sufficient for checking whether KTLS is enabled in a given sockbuf,
which simplifies some refactoring further down the road.

Note that the SOLISTENING() check can go away because
SOCK_IO_RECV_LOCK() atomically locks the socket buffer and checks
whether the socket is a listening socket.  This changes the returned
errno value, so update a test which checks it.

Reviewed by:	gallatin
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D45674

(cherry picked from commit 163cdf6a32)
2024-07-23 09:01:30 -04:00
Mark Johnston
c1dd895406 sched tests: Avoid underflow when maxcpuid == 0
MFC after:	1 week

(cherry picked from commit 5b98bd3068)
2024-07-21 20:55:27 -04:00
Gleb Smirnoff
5a676edf9b netpfil tests: disable ICMPv6 rate limiting in the test jail
The dummynet test uses flood ping as source of traffic, so the rate
limiting of ICMP replies broke the test.

Fixes:	32aeee8ce7
(cherry picked from commit 75d15e893b)
2024-06-26 12:48:44 +08:00
Kristof Provost
f930830284 pf tests: test longer anchor names
PR:		279225
MFC after:	3 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 8b28ec3861)
2024-06-18 09:59:02 +02:00
Alan Somers
27b1954250 fusefs: make the tests more robust to changes to maxphys
Remove assumptions in two test cases that maxphys won't be huge.

Reported by:	kib
Sponsored by:	Axcient

(cherry picked from commit b2792a300d)
2024-06-13 12:15:58 -06:00
Gleb Smirnoff
57a32d76f6 tests/fusefs: fix all tests that depend on kern.maxphys
The tests try to read kern.maxphys sysctl into int value, while
unsigned long is required.  Not sure when this was broken, seems like
since cd85379104.

Reviewed by:		asomers
Differential Revision:	https://reviews.freebsd.org/D45053

(cherry picked from commit e9b411d273)
2024-06-13 12:15:51 -06:00
Kristof Provost
357d111ef7 pf tests: make ether:dummynet test a little more robust
Allow slightly more bandwidth, but cause ping to give up sooner.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 1c5b886e11)
2024-06-11 08:05:38 +02:00
Kristof Provost
c3fe41b3a3 vnet tests: check for if_bridge.ko
A number of tests create a bridge, but did not check if if_bridge.ko is loaded.

We usually get away with that, because `ifconfig bridge create` autoloads the
module, but if we run the tests in a jail (e.g. because of kyua's upcoming
execenv.jail.params feature) we can't load the module and these tests can fail.

Check if the module is loaded, skip the test if it is not.

Reviewed by:	markj
MFC after:	1 week
Event:		Kitchener-Waterloo Hackathon 202406
Differential Revision:	https://reviews.freebsd.org/D45487

(cherry picked from commit 480ad40553)
2024-06-11 08:03:23 +02:00
Zhenlei Huang
c9188db6f9 ifconfig: Redo fix vlan/vlanproto reconfiguration
When the if_vlan(4) interface has not been fully configured, i.e., a
bare interface without a physical interface associated with it,
retrieving the current settings of it and unconditionally overwriting
`params` will result in losing vlandev settings in `params`. That will
lead to failing to associate the if_vlan(4) interface with the requested
physical interface and the false report 'both vlan and vlandev must be
specified'.

Fix that by checking if the vlan interface has been fully configured.

The basic VLAN test is slightly modified to cover this case.

PR:		279181
Reviewed by:	kp
Tested by:	Mike Tancsa <mike@sentex.net>
Fixes:		b82b8055ad ifconfig: fix vlan/vlanproto reconfiguration
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D45283

(cherry picked from commit 76df3c57a0)
2024-05-25 00:03:02 +08:00
Mariusz Zaborski
ea5a708625 geli: allocate a UMA pool earlier
The functions g_eli_init_uma and g_eli_fini_uma are used to trace
the number of devices in GELI. There is an issue where the g_eli_create
function may fail before g_eli_init_uma is called, however
g_eli_fini_uma is still executed in the fail path. This can
incorrectly decrease the device count to zero, potentially leading to
the UMA pool being freed. Accessing the device after the pool has been
freed causes a system panic.

This commit resolves the issue by ensuring devices count is increassed
eariler.

PR:		278828
Reported by:	Andre Albsmeier <mail@fbsd2.e4m.org>
Reviewed by:	asomers
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D45225

(cherry picked from commit 4b3141f5d5)
2024-05-23 08:00:57 +02:00
Mark Johnston
c390847996 wg tests: Add a simple regression test case for netmap support
MFC after:	1 month
Sponsored by:	Klara, Inc.
Sponsored by:	Zenarmor

(cherry picked from commit c0f1323241)
2024-05-20 09:42:46 -04:00
Kristof Provost
18c38eda39 if_ovpn: cope with loops
User misconfiguration may lead to routing loops where we try to send the tunnel
packet into the tunnel. This eventually leads to stack overflows and panics.

Avoid this using if_tunnel_check_nesting(), which will drop the packet if we're
looping or we hit three layers of nested tunnels.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 59a6666ec9)
2024-05-20 09:39:52 +02:00
Jake Freeland
a94eacb139 tests: Add ktrace regression test for shm_open
Verify that a capability violation is recorded when shm_open(2) is called
with a non-anonymous path.

Approved by:	markj (mentor)
Reviewed by:	markj
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D44733

(cherry picked from commit 054a472059)
2024-05-11 18:57:44 -05:00
Jake Freeland
44952722a0 tests: Add ktrace capability violation test cases
Introduce regression tests for ktrace(2) that target capability
violations.

These test cases ensure that ktrace(2) records these violations:
- CAPFAIL_NOTCAPABLE
- CAPFAIL_INCREASE
- CAPFAIL_SYSCALL
- CAPFAIL_SIGNAL
- CAPFAIL_PROTO
- CAPFAIL_SOCKADDR
- CAPFAIL_NAMEI
- CAPFAIL_CPUSET

A portion of these test cases create processes that do NOT enter
capability mode, but raise violations. This is intended behavior.
Users may run `ktrace -t p` on non-Capsicumized programs to detect
violations that would occur if the process were in capability mode.

Reviewed by:	markj
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D40682

(cherry picked from commit 2f39a98664)
2024-05-11 18:57:44 -05:00
Lexi Winter
59e7c575c5 tests: move atf_python/sys/ into the tests package
Reviewed by:	markj
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1174

(cherry picked from commit e1e636193d)
2024-04-29 10:11:07 -04:00
Kajetan Staszkiewicz
9f3032b76b pf tests: Add option to send fragmented packets
Add option to send fragmented packets and to properly sniff them by
reassembling them by the sniffer itself.

Reviewed by:	kp
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D42354

(cherry picked from commit d7c9de2d68)

pf: Fix packet reassembly

Don't drop fragmented packets when reassembly is disabled, they can be
matched by rules with "fragment" keyword. Ensure that presence of scrub
rules forces old behaviour.

Reviewed by:	kp
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D42355

(cherry picked from commit ede5d4ff5b)

pf: Update documentation regarding matching, scrubbing and reassembly

Update pf documentation:

 - default behaviour of fragment reassembly
 - introduction of scrub option for filter rules
 - disadvantages of using the old scrub ruleset
 - options supported for match rules
 - fix missing list block end
 - remove duplicate description of match filter rule
 - update example to modern syntax

Reviewed by:	kp
Fragments obtained from:	OpenBSD
Sponsored by:	InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D42270

(cherry picked from commit 5ed470bdb9)
2024-04-24 22:11:56 +00:00
Mark Johnston
615bd9d0a0 ptrace tests: Fix a signed/unsigned integer comparison
Reported by:	Jenkins
Fixes:	43b4da4411 ("ptrace tests: Add a test using PROC_REAP_KILL to kill a traced debuggee")

(cherry picked from commit 77c3e564b4)
2024-04-15 10:05:13 -04:00
Mark Johnston
16f6ce3f82 ptrace tests: Add a test using PROC_REAP_KILL to kill a traced debuggee
This exercises the bug fix in commit 9241ebc796
("thread_single(9): decline external requests for traced or debugger-stopped procs").

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D44564

(cherry picked from commit 43b4da4411)
2024-04-15 10:05:13 -04:00
Dag-Erling Smørgrav
59c3e7a18c tarfs: Support paths that spill into exthdrs.
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44599

(cherry picked from commit b1fd95c9e2)

tarfs: Ignore global extended headers.

Previously, we would error out if we encountered a global extended
header, because we don't know what it means.  This doesn't really
matter though, and traditionally, tar implementations have either
ignored them or treated them as plain files, so just ignore them.
This allows tarfs to mount tar files created by `git archive`.

MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D44600

(cherry picked from commit 584e1c355a)

tarfs: Fix 32-bit build.

MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D44613

(cherry picked from commit 0238d3711d)
2024-04-08 12:10:41 +02:00
Ed Maste
ea3910c452 path_test: fix cap_rights_init usage
Capability rights passed to cap_rights_* are not simple bitmaks and
cannot be ORed together in general (although it will work for certain
subsets of rights).

PR:		277057
Fixes:		e5e1d9c7b7 ("path_test: Add a test case for...")
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 8d1348f55a)
2024-03-22 09:30:32 -04:00
Jose Luis Duran
b2cb054dac netlink: Add tests when adding an interface route
Add tests for adding a route using an interface only (without an IP
address).

Reviewed by:	rcm
Approved by:	kp (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D41436

(cherry picked from commit 1db64f8936)
2024-03-14 16:27:54 +08:00
Dag-Erling Smørgrav
08e799c0cc tarfs: Fix two input validation issues.
* Reject hard or soft links with an empty target path.  Currently, a
  debugging kernel will hit an assertion in tarfs_lookup_path() while
  a non-debugging kernel will happily create a link to the mount root.

* Use a temporary variable to store the result of the link target path,
  and copy it to tnp->other only once we have found it to be valid.
  Otherwise we error out after creating a reference to the target but
  before incrementing the target's reference count, which results in a
  use-after-free situation in the cleanup code.

* Correctly return ENOENT from tarfs_lookup_path() if the requested
  path was not found and create_dirs is false.  Luckily, existing
  callers did not rely solely on the return value.

MFC after:	3 days
PR:		277360
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	sjg
Differential Revision:	https://reviews.freebsd.org/D44161

(cherry picked from commit 38b3683592)

tarfs: Improve validation of numeric fields.

MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	sjg, allanjude
Differential Revision:	https://reviews.freebsd.org/D44166

(cherry picked from commit 8427d94ce0)

tarfs: Avoid overflow in exthdr calculation.

MFC after:	3 days
PR:		277420
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D44202

(cherry picked from commit c291b7914e)

tarfs: Remove unnecessary hack and obsolete comment.

MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44203

(cherry picked from commit e212f0c066)

tarfs: Fix checksum calculation.

The checksum code assumed that struct ustar_header filled an entire
block and calculcated the checksum based on the size of the structure.
The header is in fact only 500 bytes long while the checksum covers
the entire block (“logical record” in POSIX terms).  Add padding and
an assertion, and clean up the checksum code.

MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D44226

(cherry picked from commit 0118b0c8e5)

tarfs: Factor out common test code.

MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D44227

(cherry picked from commit 32b8aac6f9)

tarfs: Fix checksum on 32-bit platforms.

MFC after:	3 days
Fixes:		b56872332e47786afc09515a4daaf1388da4d73c
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D44261

(cherry picked from commit cbddb2f02c)
2024-03-11 13:19:06 +01:00
Konstantin Belousov
acb407522c sigsys test: correct count of delivered signals
(cherry picked from commit 09dd7240ac)
2024-03-01 06:12:02 +02:00
Alan Somers
739488cc21 fusefs: fix invalid value for st_birthtime.tv_nsec
If a file system's on-disk format does not support st_birthtime, it
isn't clear what value it should return in stat(2).  Neither our man
page nor the OpenGroup specifies.  But our convention for UFS and
msdosfs is to return { .tv_sec = -1, .tv_nsec = 0 }.  fusefs is
different.  It returns { .tv_sec = -1, .tv_nsec = -1 }.  It's done that
ever since the initial import in SVN r241519.

Most software apparently handles this just fine.  It must, because we've
had no complaints.  But the Rust standard library will panic when
reading such a timestamp during std::fs::metadata, even if the caller
doesn't care about that particular value.  That's a separate bug, and
should be fixed.

Change our invalid value to match msdosfs and ufs, pacifying the Rust
standard library.

PR:		276602
Sponsored by:	Axcient
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D43590

(cherry picked from commit 55b80e2ca5)
2024-02-12 10:43:11 -07:00
Alan Somers
314a881fce fusefs: fix some memory leaks in the tests
(cherry picked from commit 39f5d8dd1b)
2024-02-12 10:43:07 -07:00
Alan Somers
8510b8fe2a fusefs: prefer new/delete over malloc/free
Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D43464

(cherry picked from commit 8bae22bbbe)
2024-02-12 10:43:03 -07:00
Alan Somers
31c31be716 fusefs: more consistent operand ordering in io.cc
(cherry picked from commit daf26f9350)
2024-02-12 10:42:57 -07:00
Alan Somers
9826f8eb0c fusefs: fix an interaction between copy_file_range and mmap
If a copy_file_range operation tries to read from a page that was
previously written via mmap, that page must be flushed first.

Reviewed by:	kib
Differential Revision: https://reviews.freebsd.org/D43451

(cherry picked from commit 1c909c300b)
2024-02-12 10:42:46 -07:00
Mark Johnston
3a90a44537 kqueue tests: Add a regression test
Based on the test case submitted by Andreas Bock for PR 275286.

PR:		275286
MFC after:	2 weeks

(cherry picked from commit f546326595)
2024-02-11 10:14:44 -05:00
Mark Johnston
e9264b5681 netinet tests: Make test jail names unique
Otherwise we get spurious test failures when running tests in parallel.
The intent here was to name jails after the tests, but this was done
incorrectly in a couple of places.

MFC after:	1 week

(cherry picked from commit 001c48b413)
2024-02-03 14:11:09 -05:00
Mark Johnston
7a14a721c0 netinet6 tests: Restore an atf_check invocation
This one has been commented out since the initial commit, but doesn't
appear to pose any problems.

MFC after:	1 week

(cherry picked from commit 3f73fbb0ac)
2024-02-03 14:10:56 -05:00
Kyle Evans
aebaa32c31 kern: pts: do not special case closed slave side
This would previously return 1 if the slave side of the pts was closed
to force an application to read() from it and observe the EOF, but it's
not clear why and this is inconsistent both with how we handle devices
with similar mechanics (like pipes) and also with other kernels, such as
OpenBSD/NetBSD and Linux.

PR:             239604
Reviewed by:	kib

(cherry picked from commit 30189156d3)
2024-01-30 11:11:24 -06:00
Michael Gmelin
e65182c7bc libifconfig: Fix bridge status member list
When this functionality was moved to libifconfig in 3dfbda3401,
the end of list calculation was modified for unknown reasons, practically
limiting the number of bridge member returned to (about) 102.

This patch changes the calculation back to what it was originally and
adds a unit test to verify it works as expected.

Reported by:	Patrick M. Hausen (via ML)
Reviewed by:	kp
Approved by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D43135

(cherry picked from commit 3d36053ca6)
2024-01-28 18:55:56 +01:00
Alan Somers
62f890cfbc Add a regression test for PR 276191.
The bug isn't fusefs-specific, but this is the easiest way to reproduce
it.

PR:		276191
Differential Revision:  https://reviews.freebsd.org/D43446
Reviewed by: 	kib

(cherry picked from commit 6b1c534927)
2024-01-19 19:01:14 -07:00