freebsd-src/sys/netpfil
Zhenlei Huang 2671bde992 pfsync: Correctly check if bpf peers are present
On creating the pfsync(4) interface, pfsync_clone_create() does an
unconditional bpfattach(). Use bpf_peers_present() which was introduced
in commit 16d878cc99 [1] to check the presence of bpf peers.

This will save a little CPU cycles and memory usage when the
synchronisation interface is not configured and there is no bpf peers
present. There should be no functional change.

1. 16d878cc99 Fix the following bpf(4) race condition which can result in a panic

Reviewed by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45533
2024-06-09 09:05:22 +08:00
..
ipfilter/netinet netpfil: Fix typos in source code comments 2024-04-18 16:17:10 +02:00
ipfw ipfw: Skip to the start of the loop when following a keep-state rule 2024-02-15 17:57:51 -08:00
pf pfsync: Correctly check if bpf peers are present 2024-06-09 09:05:22 +08:00