diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-13 07:42:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-11-13 07:42:50 +0000 |
commit | 5657422ec5a056210fdacfb8a0c45249c460338b (patch) | |
tree | da531add878085c5763879a4f5b917864353dbe6 /sys/net/if_loop.c | |
parent | 97ab67dd1708a1fa07fa2976f8fafe642a10cbf1 (diff) |
do not forward garbled SIMPLEX-generated packets to bpf; from Jean-Luc.Richier@imag.fr; netbsd pr#1693
Diffstat (limited to 'sys/net/if_loop.c')
-rw-r--r-- | sys/net/if_loop.c | 7 |
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 |