From owner-freebsd-net Tue May 30 14:56: 2 2000 Delivered-To: freebsd-net@freebsd.org Received: from bubba.whistle.com (bubba.whistle.com [207.76.205.7]) by hub.freebsd.org (Postfix) with ESMTP id 6A96637B578 for ; Tue, 30 May 2000 14:56:00 -0700 (PDT) (envelope-from archie@whistle.com) Received: (from archie@localhost) by bubba.whistle.com (8.9.3/8.9.2) id OAA00803; Tue, 30 May 2000 14:55:27 -0700 (PDT) From: Archie Cobbs Message-Id: <200005302155.OAA00803@bubba.whistle.com> Subject: Re: BPF fix to if_loop.c In-Reply-To: <7130.959686610@lychee.itojun.org> from Jun-ichiro itojun Hagino at "May 30, 2000 08:36:50 pm" To: itojun@iijlab.net (Jun-ichiro itojun Hagino) Date: Tue, 30 May 2000 14:55:26 -0700 (PDT) Cc: freebsd-net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Jun-ichiro itojun Hagino writes: > > The following one-liner avoids junk (non-matching DLT_xx encapsulation) > > to be injected to bpf, non-loopback ifp is passed to if_simloop. > >- if (ifp->if_bpf) { > >+ if (ifp->if_bpf && ifp->if_flags & IFF_LOOPBACK) { > > sorry this was incorrect. however, I think there should be check > if ifp really wants DLT_NULL encapsulation or not. Hmm.. maybe a better fix is to remove this BPF section altogether.. ? It's only going to result in showing the same packet twice, right? -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message