Make sure we don't try to dereference the the if_bpf pointer when bpf has

not been compiled into the the kernel.

Submitted by:	benno
This commit is contained in:
csjp 2006-06-03 06:37:00 +00:00
parent 730d02a45f
commit 5a4a810c4f

View File

@ -630,7 +630,11 @@ static __inline int
bpf_peers_present(struct bpf_if *bpf)
{
return !LIST_EMPTY(&bpf->bif_dlist);
#if defined(DEV_BPF) || defined(NETGRAPH_BPF)
return (!LIST_EMPTY(&bpf->bif_dlist));
#else
return (0);
#endif /* DEV_BPF || NETGRAPH_BPF */
}
#define BPF_TAP(_ifp,_pkt,_pktlen) do { \