aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-09-25 12:06:01 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-09-25 12:06:01 +0000
commit46783fb897761a099b5d9629afd30bb97cdeed5e (patch)
treeefd419464a05c5c9549c3ea5cc49e8d61c143e27 /sys/net/if_vlan.c
parent40bc58df9a215b74d944ee58d146f6b2f3107568 (diff)
downloadsrc-46783fb897761a099b5d9629afd30bb97cdeed5e.tar.gz
src-46783fb897761a099b5d9629afd30bb97cdeed5e.zip
Remove NBPF conditionality of bpf calls in most of our network drivers.
This means that we will not have to have a bpf and a non-bpf version of our driver modules. This does not open any security hole, because the bpf core isn't loadable The drivers left unchanged are the "cross platform" drivers where the respective maintainers are urged to DTRT, whatever that may be. Add a couple of missing FreeBSD tags.
Notes
Notes: svn path=/head/; revision=51646
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index dac28c8e520c..bc0de3a81a45 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -57,7 +57,6 @@
#include "vlan.h"
#if NVLAN > 0
#include "opt_inet.h"
-#include "bpf.h"
#include <sys/param.h>
#include <sys/kernel.h>
@@ -69,9 +68,7 @@
#include <sys/sysctl.h>
#include <sys/systm.h>
-#if NBPF > 0
#include <net/bpf.h>
-#endif
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_arp.h>
@@ -176,9 +173,7 @@ vlaninit(void *dummy)
ifp->if_snd.ifq_maxlen = ifqmaxlen;
if_attach(ifp);
ether_ifattach(ifp);
-#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
-#endif
/* Now undo some of the damage... */
ifp->if_data.ifi_type = IFT_8021_VLAN;
ifp->if_data.ifi_hdrlen = EVL_ENCAPLEN;
@@ -209,10 +204,8 @@ vlan_start(struct ifnet *ifp)
IF_DEQUEUE(&ifp->if_snd, m);
if (m == 0)
break;
-#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, m);
-#endif /* NBPF > 0 */
/*
* If the LINK0 flag is set, it means the underlying interface
@@ -304,7 +297,6 @@ vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t)
*/
m->m_pkthdr.rcvif = &ifv->ifv_if;
-#if NBPF > 0
if (ifv->ifv_if.if_bpf) {
/*
* Do the usual BPF fakery. Note that we don't support
@@ -318,7 +310,6 @@ vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t)
m0.m_data = (char *)eh;
bpf_mtap(&ifv->ifv_if, &m0);
}
-#endif
ifv->ifv_if.if_ipackets++;
ether_input(&ifv->ifv_if, eh, m);
return;
@@ -356,7 +347,6 @@ vlan_input(struct ether_header *eh, struct mbuf *m)
m->m_len -= EVL_ENCAPLEN;
m->m_pkthdr.len -= EVL_ENCAPLEN;
-#if NBPF > 0
if (ifv->ifv_if.if_bpf) {
/*
* Do the usual BPF fakery. Note that we don't support
@@ -370,7 +360,6 @@ vlan_input(struct ether_header *eh, struct mbuf *m)
m0.m_data = (char *)eh;
bpf_mtap(&ifv->ifv_if, &m0);
}
-#endif
ifv->ifv_if.if_ipackets++;
ether_input(&ifv->ifv_if, eh, m);
return 0;