summaryrefslogtreecommitdiff
path: root/sys/net/if_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if_loop.c')
-rw-r--r--sys/net/if_loop.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 5c3db2e0059..518bc91d0af 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -122,7 +122,12 @@ looutput(ifp, m, dst, rt)
panic("looutput: no header mbuf");
ifp->if_lastchange = time;
#if NBPFILTER > 0
- if (ifp->if_bpf) {
+ /*
+ * only send packets to bpf if they are real loopback packets;
+ * looutput() is also called for SIMPLEX interfaces to duplicate
+ * packets for local use. But don't dup them to bpf.
+ */
+ if (ifp->if_bpf && (ifp->if_flags&IFF_LOOPBACK)) {
/*
* We need to prepend the address family as
* a four byte field. Cons up a dummy header