mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +00:00
Since bpf is no longer an optional component, remove associated ifdef's.
Submitted by: don't quite remember - the name of the sender disappeared with the rest of my inbox. :(
This commit is contained in:
parent
c56c20f13d
commit
748bb23dcc
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104366
@ -3,9 +3,7 @@
|
||||
.PATH: ${.CURDIR}/../../net ${.CURDIR}/../../netinet
|
||||
|
||||
KMOD= if_gre
|
||||
SRCS= if_gre.c ip_gre.c opt_inet.h opt_ns.h opt_atalk.h bpf.h
|
||||
|
||||
CLEANFILES+=bpf.h
|
||||
SRCS= if_gre.c ip_gre.c opt_inet.h opt_ns.h opt_atalk.h
|
||||
|
||||
opt_inet.h:
|
||||
echo "#define INET 1" > ${.TARGET}
|
||||
@ -16,7 +14,4 @@ opt_ns.h:
|
||||
opt_atalk.h:
|
||||
echo "#define NETATALK 1" > ${.TARGET}
|
||||
|
||||
bpf.h:
|
||||
echo "#define NBPF 1" > ${.TARGET}
|
||||
|
||||
.include <bsd.kmod.mk>
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include "opt_atalk.h"
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ns.h"
|
||||
#include "bpf.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -78,9 +77,7 @@
|
||||
#error "Huh? if_gre without inet?"
|
||||
#endif
|
||||
|
||||
#if NBPF > 0
|
||||
#include <net/bpf.h>
|
||||
#endif
|
||||
|
||||
#include <net/net_osdep.h>
|
||||
#include <net/if_gre.h>
|
||||
@ -183,9 +180,7 @@ gre_clone_create(ifc, unit)
|
||||
sc->encap = NULL;
|
||||
sc->called = 0;
|
||||
if_attach(&sc->sc_if);
|
||||
#if NBPF
|
||||
bpfattach(&sc->sc_if, DLT_NULL, sizeof(u_int32_t));
|
||||
#endif
|
||||
LIST_INSERT_HEAD(&gre_softc_list, sc, sc_list);
|
||||
return (0);
|
||||
}
|
||||
@ -201,9 +196,7 @@ gre_clone_destroy(ifp)
|
||||
encap_detach(sc->encap);
|
||||
#endif
|
||||
LIST_REMOVE(sc, sc_list);
|
||||
#if NBPF
|
||||
bpfdetach(ifp);
|
||||
#endif
|
||||
if_detach(ifp);
|
||||
free(sc, M_GRE);
|
||||
}
|
||||
@ -247,7 +240,6 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
|
||||
ip = NULL;
|
||||
osrc = 0;
|
||||
|
||||
#if NBPF
|
||||
if (ifp->if_bpf) {
|
||||
/* see comment of other if_foo.c files */
|
||||
struct mbuf m0;
|
||||
@ -259,7 +251,6 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
|
||||
|
||||
bpf_mtap(ifp, &m0);
|
||||
}
|
||||
#endif
|
||||
|
||||
m->m_flags &= ~(M_BCAST|M_MCAST);
|
||||
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ns.h"
|
||||
#include "opt_atalk.h"
|
||||
#include "bpf.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -209,7 +208,6 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto)
|
||||
m->m_len -= hlen;
|
||||
m->m_pkthdr.len -= hlen;
|
||||
|
||||
#if NBPF > 0
|
||||
if (sc->sc_if.if_bpf) {
|
||||
struct mbuf m0;
|
||||
u_int32_t af = AF_INET;
|
||||
@ -219,8 +217,7 @@ gre_input2(struct mbuf *m ,int hlen, u_char proto)
|
||||
m0.m_data = (char *)⁡
|
||||
|
||||
bpf_mtap(&(sc->sc_if), &m0);
|
||||
}
|
||||
#endif /*NBPF > 0*/
|
||||
}
|
||||
|
||||
m->m_pkthdr.rcvif = &sc->sc_if;
|
||||
|
||||
@ -306,7 +303,6 @@ gre_mobile_input(m, va_alist)
|
||||
ip->ip_sum = 0;
|
||||
ip->ip_sum = in_cksum(m, (ip->ip_hl << 2));
|
||||
|
||||
#if NBPF > 0
|
||||
if (sc->sc_if.if_bpf) {
|
||||
struct mbuf m0;
|
||||
u_int af = AF_INET;
|
||||
@ -316,8 +312,7 @@ gre_mobile_input(m, va_alist)
|
||||
m0.m_data = (char *)⁡
|
||||
|
||||
bpf_mtap(&(sc->sc_if), &m0);
|
||||
}
|
||||
#endif /*NBPFILTER > 0*/
|
||||
}
|
||||
|
||||
m->m_pkthdr.rcvif = &sc->sc_if;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user