From owner-cvs-src@FreeBSD.ORG Fri Sep 17 14:49:09 2004 Return-Path: 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 382F016A4CE; Fri, 17 Sep 2004 14:49:09 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CCF143D41; Fri, 17 Sep 2004 14:49:09 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i8HEn9w4083950; Fri, 17 Sep 2004 14:49:09 GMT (envelope-from csjp@repoman.freebsd.org) Received: (from csjp@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8HEn9Jc083949; Fri, 17 Sep 2004 14:49:09 GMT (envelope-from csjp) Message-Id: <200409171449.i8HEn9Jc083949@repoman.freebsd.org> From: "Christian S.J. Peron" Date: Fri, 17 Sep 2004 14:49:09 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Subject: cvs commit: src/sbin/ipfw ipfw2.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 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: Fri, 17 Sep 2004 14:49:09 -0000 csjp 2004-09-17 14:49:09 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sbin/ipfw ipfw2.c Log: MFC v1.58 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. The current code clobbers the OR and NOT bits by initializing the ``len'' element to the size, rather than OR'ing the bits. This change fixes this by changing the initialization of cmd->len to an OR operation for the O_UID, O_GID and O_JAIL opcodes. Approved by: re@ (scottl) PR: kern/63961 (partially) Revision Changes Path 1.54.2.3 +3 -3 src/sbin/ipfw/ipfw2.c