From owner-cvs-src@FreeBSD.ORG Sat Dec 31 14:50:27 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 680) id 79DCF16A420; Sat, 31 Dec 2005 14:50:27 +0000 (GMT) Date: Sat, 31 Dec 2005 14:50:27 +0000 From: Darren Reed To: Jung-uk Kim Message-ID: <20051231145027.GB38051@hub.freebsd.org> References: <200512080005.jB8053R4099474@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200512080005.jB8053R4099474@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/net bpf_filter.c 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, 31 Dec 2005 14:50:27 -0000 On Thu, Dec 08, 2005 at 12:05:03AM +0000, Jung-uk Kim wrote: > jkim 2005-12-08 00:05:03 UTC > > FreeBSD src repository > > Modified files: > sys/net bpf_filter.c > Log: > Do not accept an empty bpf program. You need to make one of two follow up changes here: 1) explicitly allow 0-length programs 2) fix bpf_filter (see the first check and its comments for "return -1") Personally I'd prefer to see (1) because it allows you to "set" a BPF program and measure the performance impact of the BPF code on networking without having to worry about the cost of executing the BPF program itself. Darren