diff options
| author | R. Christian McDonald <rcm@FreeBSD.org> | 2026-09-30 23:33:43 +0000 |
|---|---|---|
| committer | R. Christian McDonald <rcm@FreeBSD.org> | 2026-09-30 23:33:43 +0000 |
| commit | 6d7f0162bd5d25919cc18119a6e5a371acb2cf78 (patch) | |
| tree | d1dc3e7d50c9be3edd9ecbb0c4e58df4afa24727 /sys/kern/kern_fail.c | |
| parent | 82ab4adec95578b196eaf431d6ca87dd209aca6b (diff) | |
pfctl -sr calls PFNL_CMD_GETRULE once per rule, and
pf_handle_getrule() takes the rules write lock each time, so listing a
ruleset of N rules stops packet processing N times. Only zeroing the
counters (pfctl -z) needs the write lock. Take the read lock
otherwise, as DIOCGETRULENV does.
Reviewed by: kp
Approved by: kp (mentor)
Fixes: 777a4702c591 ("pf: implement addrule via netlink")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D60161
Diffstat (limited to 'sys/kern/kern_fail.c')
0 files changed, 0 insertions, 0 deletions
