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:
Christian S.J. Peron 2006-06-03 06:37:00 +00:00
parent 97fd2473ab
commit 5255290c9c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=159186

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 { \