From owner-cvs-src@FreeBSD.ORG Tue Jan 3 17:58:04 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 62A0F16A42C; Tue, 3 Jan 2006 17:58:04 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: from dbmail-mx1.orcon.net.nz (loadbalancer1.orcon.net.nz [219.88.242.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF07943D7D; Tue, 3 Jan 2006 17:57:22 +0000 (GMT) (envelope-from thompsa@freebsd.org) Received: from heff.fud.org.nz (60-234-149-201.bitstream.orcon.net.nz [60.234.149.201]) by dbmail-mx1.orcon.net.nz (8.13.2/8.13.2/Debian-1) with ESMTP id k03Hw14m031418; Wed, 4 Jan 2006 06:58:01 +1300 Received: by heff.fud.org.nz (Postfix, from userid 1001) id 4B8A12842E; Wed, 4 Jan 2006 06:57:20 +1300 (NZDT) Date: Wed, 4 Jan 2006 06:57:20 +1300 From: Andrew Thompson To: Pawel Jakub Dawidek Message-ID: <20060103175720.GD41998@heff.fud.org.nz> References: <200601022302.k02N2hBV014825@repoman.freebsd.org> <20060103112156.GB8302@garage.freebsd.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060103112156.GB8302@garage.freebsd.pl> User-Agent: Mutt/1.5.11 X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on dbmail-mx1.orcon.net.nz X-Virus-Status: Clean Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/net if_bridge.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: Tue, 03 Jan 2006 17:58:04 -0000 On Tue, Jan 03, 2006 at 12:21:56PM +0100, Pawel Jakub Dawidek wrote: > On Mon, Jan 02, 2006 at 11:02:43PM +0000, Andrew Thompson wrote: > +> thompsa 2006-01-02 23:02:43 UTC > +> > +> FreeBSD src repository > +> > +> Modified files: > +> sys/net if_bridge.c > +> Log: > +> Fix a brain-o in the last commit, the conditional was always false. > [...] > +> - if (flags & IFBAF_DYNAMIC) > +> + if ((flags & IFBAF_TYPEMASK) == IFBAF_DYNAMIC) > > On first look, I thought it does exactly the same thing, but I checked > the code and now I know it doesn't - IFBAF_DYNAMIC is 0x00. Yes, I was surprised and a little peeved too. This has been inherited from Open/NetBSD. > Another example that giving 0 for a define which should represent a flag > is a bad idea. The same problem we had in the past with M_NOWAIT. > > You should consider changing it to some real value to avoid mistakes > like this in the future or removing IFBAF_DYNAMIC entirely and changing > such condition to 'if (!(flags & IFBAF_STATIC))'. It may be best to leave IFBAF_STATIC as 0x01 and set IFBAF_DYNAMIC to 0x02, this would make the MFC less invasive. I'll get it sorted out. thanks, Andrew