diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2003-03-06 09:43:36 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2003-03-06 09:43:36 +0000 |
commit | 9d8b5ae8d219a80483ef273fe1e8c8e03ee06880 (patch) | |
tree | c57846946720128ba4088def5e6e351701d395ba /sys | |
parent | e1b19da29bb4d8f31e1cda3effad2cd3d4de8315 (diff) |
bpf_mtap incoming proto 97 traffic; ok jason@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_ether.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/netinet/ip_ether.c b/sys/netinet/ip_ether.c index c3c6ce5ccd9..4e9332f9ac8 100644 --- a/sys/netinet/ip_ether.c +++ b/sys/netinet/ip_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ether.c,v 1.41 2002/10/15 14:52:46 jason Exp $ */ +/* $OpenBSD: ip_ether.c,v 1.42 2003/03/06 09:43:35 markus Exp $ */ /* * The author of this code is Angelos D. Keromytis (kermit@adk.gr) * @@ -36,6 +36,7 @@ #include <net/if.h> #include <net/route.h> +#include <net/bpf.h> #ifdef INET #include <netinet/in.h> @@ -51,6 +52,7 @@ #include <net/if_gif.h> #include "gif.h" +#include "bpfilter.h" #ifdef ENCDEBUG #define DPRINTF(x) if (encdebug) printf x @@ -239,6 +241,18 @@ etherip_input(struct mbuf *m, ...) m_freem(m); return; } +#if NBPFILTER > 0 + if (gif_softc[i].gif_if.if_bpf) { + struct mbuf m0; + u_int32_t af = sdst.sa.sa_family; + + m0.m_next = m; + m0.m_len = 4; + m0.m_data = (char *)⁡ + + bpf_mtap(gif_softc[i].gif_if.if_bpf, &m0); + } +#endif #if NBRIDGE > 0 /* |