From owner-freebsd-ipfw@FreeBSD.ORG Tue Aug 24 20:58:49 2004 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94E4316A4D1; Tue, 24 Aug 2004 20:58:49 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8257043D54; Tue, 24 Aug 2004 20:58:49 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from freefall.freebsd.org (csjp@localhost [127.0.0.1]) i7OKwnWk068929; Tue, 24 Aug 2004 20:58:49 GMT (envelope-from csjp@freefall.freebsd.org) Received: (from csjp@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i7OKwnuE068925; Tue, 24 Aug 2004 20:58:49 GMT (envelope-from csjp) Date: Tue, 24 Aug 2004 20:58:49 GMT From: "Christian S.J. Peron" Message-Id: <200408242058.i7OKwnuE068925@freefall.freebsd.org> To: csjp@FreeBSD.org, ipfw@FreeBSD.org, csjp@FreeBSD.org Subject: Re: kern/63961: ipfw2 uid matching doesn't work correctly X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2004 20:58:49 -0000 Synopsis: ipfw2 uid matching doesn't work correctly Responsible-Changed-From-To: ipfw->csjp Responsible-Changed-By: csjp Responsible-Changed-When: Tue Aug 24 20:57:29 GMT 2004 Responsible-Changed-Why: I think this might not be a bug. If you want to match setup packets for TCP connections it does work, but only if the connection has a PCB associated with it. For instance, outgoing setup would have a PCB associated with it, so ipfw could match on that: dev0# ipfw show 00400 1 64 count tcp from any to any dst-port 4296 setup uid csjp It should be noted that all the "setup" keyword does is set the O_TCPFLAGS opcode and set the operand to TH_SYN for SYN packets. I dont think Incoming TCP connection requests would not have a PCB associated with it, so there is no-way that ipfw can look up the credential associated with it. However the UID negation problem looks like it could be a bug either in how ipfw(8) reports the rule or how the kernel is processing it. In either case I will look into it. http://www.freebsd.org/cgi/query-pr.cgi?pr=63961