summaryrefslogtreecommitdiffstats
path: root/sys/net/bpf.h
diff options
context:
space:
mode:
authorcsjp <csjp@FreeBSD.org>2006-06-03 18:48:14 +0000
committercsjp <csjp@FreeBSD.org>2006-06-03 18:48:14 +0000
commit7686abec4aa8853e5115e75e348af4611efc9194 (patch)
tree16eb27868dd245d5e6a6d26eac8dc18127e14c3f /sys/net/bpf.h
parente1f2ab1542653da55ba4006027f5fbf11ec649fb (diff)
downloadFreeBSD-src-7686abec4aa8853e5115e75e348af4611efc9194.zip
FreeBSD-src-7686abec4aa8853e5115e75e348af4611efc9194.tar.gz
Back out previous two commits, this caused some problems in the namespace
resulting in some build failures. Instead, to fix the problem of bpf not being present, check the pointer before dereferencing it. This is a temporary bandaid until we can decide on how we want to handle the bpf code not being present. This will be fixed shortly.
Diffstat (limited to 'sys/net/bpf.h')
-rw-r--r--sys/net/bpf.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/net/bpf.h b/sys/net/bpf.h
index b72977f..0782a66 100644
--- a/sys/net/bpf.h
+++ b/sys/net/bpf.h
@@ -603,9 +603,6 @@ struct bpf_dltlist {
};
#ifdef _KERNEL
-#include "opt_bpf.h"
-#include "opt_netgraph.h"
-
/*
* Descriptor associated with each attached hardware interface.
*/
@@ -633,11 +630,9 @@ static __inline int
bpf_peers_present(struct bpf_if *bpf)
{
-#if defined(DEV_BPF) || defined(NETGRAPH_BPF)
- return (!LIST_EMPTY(&bpf->bif_dlist));
-#else
+ if (bpf && !LIST_EMPTY(&bpf->bif_dlist))
+ return (1);
return (0);
-#endif /* DEV_BPF || NETGRAPH_BPF */
}
#define BPF_TAP(_ifp,_pkt,_pktlen) do { \
OpenPOWER on IntegriCloud