opnsense-src/tests/sys
Olivier Cochard cf3f8e3dc6 carp: fix global demotion counter to VRRP advertisements
When net.inet.carp.preempt=1 and a physical interface goes down, the global
V_carp_demotion counter is incremented. For CARP this was already reflected in
outgoing advertisements via DEMOTE_ADVSKEW(), but VRRP sent the raw
sc_vrrp_prio unchanged, so demotion had no effect.

Add DEMOTE_VRRP_PRIO(), a macro analogous to DEMOTE_ADVSKEW():
It subtracts V_carp_demotion from the configured priority and clamps the result
to [0, 254]. Priority 0 is VRRPv3's "resign" signal and causes backups to
preempt immediately. Priority 255 (IP address owner) is never demoted.

Reviewed by:	kp
Approved by:	kp
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D55558

(cherry picked from commit 9f71153aec0cb455cd49af6d4ca7e4c16fd45d7a)
2026-11-10 12:51:01 +01:00
..
acl Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
aio aio(4) tests: do not rely on (int *)-1 being invalid address 2026-03-26 08:45:17 -06:00
audit Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
auditpipe Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
cam CTL: add ATF tests for REPORT SUPPORTED OPCODES 2026-04-30 11:24:06 -06:00
capsicum sigqueue: In capability mode, only allow signalling self 2026-06-09 02:59:42 +00:00
cddl zfsd: don't try to fix an OFFLINE condition 2025-08-04 10:00:52 -06:00
common tests: disable transmit checksum offloading for epair interfaces 2025-09-04 13:52:37 +02:00
compat32 Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
devrandom Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
fifo Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
file closefrom_test: Convert to atf-c(3) 2025-12-18 13:42:23 -05:00
fs fdescfs: Pass up additional metadata during lookups 2026-09-30 11:46:46 +02:00
geom tests: Increase timeout 2026-01-20 16:36:55 +00:00
kern ktls: Fix an off-by-one bug in tls13_find_record_type() 2026-09-30 11:46:52 +02:00
kqueue kqueue: Avoid enqueuing an already-enqueued knote 2026-08-11 07:43:51 +02:00
mac tests: Increase timeout 2026-01-20 16:36:55 +00:00
mqueue Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
net wg(4): Add a test that the driver handles a decryption failure 2026-08-11 07:43:58 +02:00
netgraph tests/netgraph: Add a test for races between if_detach() and vnet_if_return() 2026-04-30 17:52:02 +08:00
netinet carp: fix global demotion counter to VRRP advertisements 2026-11-10 12:51:01 +01:00
netinet6 tests: Add some simple regression tests for ip_mroute 2026-09-14 07:26:27 +02:00
netipsec tests: fix test for NULL encription 2025-03-25 10:23:40 +03:00
netlink netlink: Move static arrays of parsers into tests that use them 2025-04-11 09:52:39 -04:00
netmap netmap: Disable a buggy and unsafe test (sync_kloop_conflict) 2025-03-06 13:22:25 -05:00
netpfil pf: first-match-wins for nat rules, even in anchors 2026-11-10 12:26:41 +01:00
opencrypto Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
pjdfstest Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
posixshm posixshm: Fix handling of sendfile() with largepage objects 2026-07-06 10:29:39 +02:00
ses
sound sound: Revalidate after reacquiring locks when resizing buffers 2026-10-15 11:28:55 +02:00
sys bitstring_test: fix bit_nclear/bit_nset tests for last iteration 2025-10-28 02:20:35 -07:00
vfs Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
vm device_pager: Avoid double-insertion of pages into the pager list 2026-07-06 10:29:21 +02:00
vmm vmm tests: Check for /dev/vmmctl to decide if vmm is initialized 2025-02-08 16:05:37 +00:00
Makefile ctl: add some ATF tests for READ BUFFER 2024-09-04 14:38:12 +00:00
Makefile.depend
Makefile.inc Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00