summaryrefslogtreecommitdiffstats
path: root/sys/net/if_enc.c
diff options
context:
space:
mode:
authorangelos <angelos@openbsd.org>1997-02-27 04:05:45 +0000
committerangelos <angelos@openbsd.org>1997-02-27 04:05:45 +0000
commitdff15f04fef6216d73e4c37061376c57b88a7bc8 (patch)
tree0cb645cc5a93fb73a7b68cf2f5aa19311b4dada3 /sys/net/if_enc.c
parentNow reports ESP I/O packet counters. (diff)
downloadwireguard-openbsd-dff15f04fef6216d73e4c37061376c57b88a7bc8.tar.xz
wireguard-openbsd-dff15f04fef6216d73e4c37061376c57b88a7bc8.zip
BPF support ifdefed.
Diffstat (limited to 'sys/net/if_enc.c')
-rw-r--r--sys/net/if_enc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/if_enc.c b/sys/net/if_enc.c
index 6a3c417b0a9..1f6d8e8509f 100644
--- a/sys/net/if_enc.c
+++ b/sys/net/if_enc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_enc.c,v 1.2 1997/02/24 13:33:58 niklas Exp $ */
+/* $OpenBSD: if_enc.c,v 1.3 1997/02/27 04:05:45 angelos Exp $ */
/*
* The author of this code is John Ioannidis, ji@tla.org,
@@ -104,7 +104,9 @@ encattach(int nenc)
enc->enc_if.if_hdrlen = 0;
enc->enc_if.if_addrlen = 0;
if_attach(&enc->enc_if);
+#if NBPFILTER > 0
bpfattach(&enc->enc_if.if_bpf, &enc->enc_if, DLT_NULL, sizeof(u_int));
+#endif
}
}
@@ -126,6 +128,7 @@ register struct rtentry *rt;
if ((m->m_flags & M_PKTHDR) == 0)
panic("encoutput no HDR");
ifp->if_lastchange = time;
+#if NBPFILTER > 0
if (ifp->if_bpf) {
/*
* We need to prepend the address family as
@@ -143,6 +146,7 @@ register struct rtentry *rt;
bpf_mtap(ifp->if_bpf, &m0);
}
+#endif
m->m_pkthdr.rcvif = ifp;
if (rt && rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE)) {