diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-09-25 12:06:01 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-09-25 12:06:01 +0000 |
commit | 46783fb897761a099b5d9629afd30bb97cdeed5e (patch) | |
tree | efd419464a05c5c9549c3ea5cc49e8d61c143e27 /sys/net/if_tun.c | |
parent | 40bc58df9a215b74d944ee58d146f6b2f3107568 (diff) | |
download | src-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_tun.c')
-rw-r--r-- | sys/net/if_tun.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 9c4332ed895d..7617968fbe1a 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -12,6 +12,8 @@ * roots in a similar driver written by Phil Cockcroft (formerly) at * UCL. This driver is based much more on read/write/poll mode of * operation though. + * + * $FreeBSD$ */ #include "tun.h" @@ -50,10 +52,7 @@ #include <netns/ns_if.h> #endif -#include "bpf.h" -#if NBPF > 0 #include <net/bpf.h> -#endif #include <net/if_tunvar.h> #include <net/if_tun.h> @@ -136,9 +135,7 @@ tuncreate(dev) ifp->if_snd.ifq_maxlen = ifqmaxlen; ifp->if_softc = sc; if_attach(ifp); -#if NBPF > 0 bpfattach(ifp, DLT_NULL, sizeof(u_int)); -#endif dev->si_drv1 = sc; } @@ -336,7 +333,6 @@ tunoutput(ifp, m0, dst, rt) return EHOSTDOWN; } -#if NBPF > 0 /* BPF write needs to be handled specially */ if (dst->sa_family == AF_UNSPEC) { dst->sa_family = *(mtod(m0, int *)); @@ -362,7 +358,6 @@ tunoutput(ifp, m0, dst, rt) bpf_mtap(ifp, &m); } -#endif /* NBPF > 0 */ /* prepend sockaddr? this may abort if the mbuf allocation fails */ if (tp->tun_flags & TUN_LMODE) { @@ -628,7 +623,6 @@ tunwrite(dev, uio, flag) top->m_pkthdr.len = tlen; top->m_pkthdr.rcvif = ifp; -#if NBPF > 0 if (ifp->if_bpf) { /* * We need to prepend the address family as @@ -646,7 +640,6 @@ tunwrite(dev, uio, flag) bpf_mtap(ifp, &m); } -#endif #ifdef INET s = splimp(); |