Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2000 09:57:12 +0900 (JST)
From:      Jun-ichiro itojun Hagino <itojun@kame.net>
To:        current-users@freebsd.org, freebsd-net@FreeBSD.ORG
Subject:   BPF fix to if_loop.c
Message-ID:  <200005300057.JAA03008@kame199.kame.net>

next in thread | raw e-mail | index | archive | help
	The following one-liner avoids junk (non-matching DLT_xx encapsulation)
	to be injected to bpf, non-loopback ifp is passed to if_simloop.

itojun


Index: if_loop.c
===================================================================
RCS file: /home/ncvs/src/sys/net/if_loop.c,v
retrieving revision 1.49
diff -u -r1.49 if_loop.c
--- if_loop.c	2000/05/26 13:47:02	1.49
+++ if_loop.c	2000/05/30 00:54:48
@@ -223,7 +223,7 @@
 	}
 
 	/* Let BPF see incoming packet */
-	if (ifp->if_bpf) {
+	if (ifp->if_bpf && ifp->if_flags & IFF_LOOPBACK) {
 		struct mbuf m0, *n = m;
 
 		/*


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005300057.JAA03008>