mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
bpf: Make bpf_peers_present a boolean inline function
This function was introduced in commit [1] and is actually used as a
boolean function although it was not defined as so.
No functional change intended.
1. 16d878cc99 Fix the following bpf(4) race condition which can result in a panic
Reviewed by: markj, kp, #network
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45509
(cherry picked from commit 0dfd11abc4bd0dcb96a6d287cc4e52e8f59b64c1)
This commit is contained in:
parent
f60124850f
commit
fded8b8bdc
1 changed files with 2 additions and 4 deletions
|
|
@ -435,15 +435,13 @@ int bpf_get_bp_params(struct bpf_if *, u_int *, u_int *);
|
|||
void bpfilterattach(int);
|
||||
u_int bpf_filter(const struct bpf_insn *, u_char *, u_int, u_int);
|
||||
|
||||
static __inline int
|
||||
static __inline bool
|
||||
bpf_peers_present(struct bpf_if *bpf)
|
||||
{
|
||||
struct bpf_if_ext *ext;
|
||||
|
||||
ext = (struct bpf_if_ext *)bpf;
|
||||
if (!CK_LIST_EMPTY(&ext->bif_dlist))
|
||||
return (1);
|
||||
return (0);
|
||||
return (!CK_LIST_EMPTY(&ext->bif_dlist));
|
||||
}
|
||||
|
||||
#define BPF_TAP(_ifp,_pkt,_pktlen) \
|
||||
|
|
|
|||
Loading…
Reference in a new issue