bpf: remove OpenBSD guards

libpcap bpf functions are supported now.

(cherry picked from commit 643e674cb2)
pull/9087/head
Victor Julien 3 years ago
parent 7c18ccfeef
commit 1b40260ae5

@ -51,8 +51,6 @@ void ConfSetBPFFilter(
} }
} }
#if !defined __OpenBSD__
/** protect bpf filter build, as it is not thread safe */ /** protect bpf filter build, as it is not thread safe */
static SCMutex bpf_set_filter_lock = SCMUTEX_INITIALIZER; static SCMutex bpf_set_filter_lock = SCMUTEX_INITIALIZER;
@ -97,5 +95,3 @@ int SCBPFCompile(int snaplen_arg, int linktype_arg, struct bpf_program *program,
return (ret); return (ret);
} }
#endif /* Not __OpenBSD__ */

@ -29,13 +29,10 @@
void ConfSetBPFFilter( void ConfSetBPFFilter(
ConfNode *if_root, ConfNode *if_default, const char *iface, const char **bpf_filter); ConfNode *if_root, ConfNode *if_default, const char *iface, const char **bpf_filter);
#if !defined __OpenBSD__
int SCBPFCompile(int snaplen_arg, int linktype_arg, struct bpf_program *program, int SCBPFCompile(int snaplen_arg, int linktype_arg, struct bpf_program *program,
const char *buf, int optimize, uint32_t mask, const char *buf, int optimize, uint32_t mask,
char *errbuf, size_t errbuf_len); char *errbuf, size_t errbuf_len);
void SCBPFFree(struct bpf_program *program); void SCBPFFree(struct bpf_program *program);
#endif /* Not __OpenBSD__ */
#endif /* __UTIL_BPF_H__ */ #endif /* __UTIL_BPF_H__ */

Loading…
Cancel
Save