opnsense-src/tests/sys
Kristof Provost 3e87bbe233 pfctl: fix recursive printing of NAT rules
pfctl_show_nat() is called recursively to print nat anchors. This passes the
anchor path, but this path was modified by pfctl_show_nat(), leading to issues
printing the anchors.

Make a copy of the path ('npath') before we modify it. Ensure we do this
correctly by sprinking in 'const', and add a test case to verify that we do now
print things correctly.

Reported by:	Thomas Pasqualini <thomas.pasqualini@orange.com>
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 58164dcb55d62ca73b5e550b8344bf61e2d8a47a)
2025-04-17 10:05:28 +02:00
..
acl Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
aio Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
audit Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
auditpipe Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
cam ctl: add tests for PREVENT ALLOW MEDIUM REMOVAL 2024-09-19 14:24:02 -06:00
capsicum capsicum tests: Serialize functional tests 2024-09-20 11:39:16 +00:00
cddl zfsd: replace vdevs with the AUX faulted state 2024-10-31 08:00:32 -06:00
common vnet tests: verify that we can load if_epair and if_bridge 2024-08-22 21:01:33 +02:00
compat32 tests: Don't recurse into sys/compat32 2023-05-16 02:06:34 +01:00
devrandom Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
fifo Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
file path_test: fix cap_rights_init usage 2024-03-22 09:30:32 -04:00
fs fusefs: fix an uninitialized memory access in fuse_vnop_deallocate 2024-10-10 12:48:39 -06:00
geom geli tests: Work around a missing MFC 2024-10-15 13:35:59 +00:00
kern tests: Add some test cases for SO_SPLICE 2024-10-17 15:48:37 +00:00
kqueue kqueue tests: Add a regression test 2024-02-11 10:14:44 -05:00
mac Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
mqueue Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
net if_ovpn: fix use-after-free of mbuf 2025-04-07 17:42:44 +02:00
netgraph Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
netinet inpcb: Further restrict binding to a port owned by a different UID 2025-03-21 09:17:52 +01:00
netinet6 netinet tests: Make some tests more reliable when run in parallel 2024-10-17 13:45:45 +00:00
netipsec Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
netlink netlink: Add tests when adding an interface route 2024-03-14 16:27:54 +08:00
netmap Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
netpfil pfctl: fix recursive printing of NAT rules 2025-04-17 10:05:28 +02:00
opencrypto Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:20 -06:00
pjdfstest Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
posixshm Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
ses Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:16 -06:00
sound sound tests: Add SNDSTIOC_ADD_USER_DEVS test 2024-08-26 16:52:02 +03:00
sys bitstring: Support large bit strings. 2023-12-13 17:41:48 +01:00
vfs Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
vm mlock tests: Add a regression test 2023-10-02 08:55:49 -04:00
vmm spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
Makefile ctl: add some ATF tests for READ BUFFER 2024-09-04 15:00:20 +00:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00