From owner-cvs-src@FreeBSD.ORG Sat Jun 3 15:06:30 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C779416A484; Sat, 3 Jun 2006 15:06:30 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B47843D45; Sat, 3 Jun 2006 15:06:30 +0000 (GMT) (envelope-from sam@errno.com) Received: from [10.0.0.248] (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id k53F6Tam044817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 3 Jun 2006 08:06:30 -0700 (PDT) (envelope-from sam@errno.com) Message-ID: <4481A575.4020306@errno.com> Date: Sat, 03 Jun 2006 08:06:29 -0700 From: Sam Leffler User-Agent: Thunderbird 1.5.0.2 (X11/20060508) MIME-Version: 1.0 To: "Christian S.J. Peron" References: <200606030637.k536b0lr090865@repoman.freebsd.org> In-Reply-To: <200606030637.k536b0lr090865@repoman.freebsd.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net bpf.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2006 15:06:35 -0000 Christian S.J. Peron wrote: > csjp 2006-06-03 06:37:00 UTC > > FreeBSD src repository > > Modified files: > sys/net bpf.h > Log: > Make sure we don't try to dereference the the if_bpf pointer when bpf has > not been compiled into the the kernel. > > Submitted by: benno Another option that avoids #ifdef's in bpf.h is to point all if_bpf's at a static structure that's initialized s.t. the list pointer is null. OTOH if we embed the data structure in the ifnet then in the no bpf config case the stub bpfattach code would just initialize the list head and again there'd be no issue. I think we can actually make bpf a loadable module now that bpf_if is exposed; I'll look at that. That should eliminate all these hacks we've been carrying around. Sam