From owner-cvs-all@FreeBSD.ORG Sat Sep 11 23:54:02 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65D8616A4CF for ; Sat, 11 Sep 2004 23:54:02 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14E4343D41 for ; Sat, 11 Sep 2004 23:54:02 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: (qmail 13925 invoked from network); 11 Sep 2004 23:54:01 -0000 Received: from gate.funkthat.com (HELO hydrogen.funkthat.com) ([69.17.45.168]) (envelope-sender ) by mail6.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 11 Sep 2004 23:54:01 -0000 Received: from hydrogen.funkthat.com (qpszcd@localhost.funkthat.com [127.0.0.1])i8BNs0uU042925; Sat, 11 Sep 2004 16:54:01 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.10/8.12.10/Submit) id i8BNs0Ek042924; Sat, 11 Sep 2004 16:54:00 -0700 (PDT) Date: Sat, 11 Sep 2004 16:53:59 -0700 From: John-Mark Gurney To: "Christian S.J. Peron" Message-ID: <20040911235359.GC72089@funkthat.com> References: <200409111944.i8BJiTe7005412@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200409111944.i8BJiTe7005412@repoman.freebsd.org> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sbin/ipfw ipfw2.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2004 23:54:02 -0000 Christian S.J. Peron wrote this message on Sat, Sep 11, 2004 at 19:44 +0000: > Currently when ipfw(8) generates the micro-instructions for rules which > contain O_UID, O_GID and O_JAIL opcodes, the F_NOT or F_OR logical > operator bits get clobbered. Making it impossible to use the ``NOT'' or > ``OR'' operators with uid, gid and jail based constraints. > > The ipfw_insn instruction template contains a ``len'' element which > stores two pieces of information, the size of the instruction > (in 32-bit words) in the low 6 bits of "len" with the 2 remaining > bits to implement OR and NOT. Why don't we use the bit field? u_int8_t logic : 2; u_int8_t len : 8; considering this is already used by the enum.. It'd make bugs like these less likely... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."