From owner-freebsd-questions Wed Nov 21 7:21:51 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 96AC637B421 for ; Wed, 21 Nov 2001 07:21:42 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id fALFLeW47679; Wed, 21 Nov 2001 09:21:40 -0600 (CST) (envelope-from dan) Date: Wed, 21 Nov 2001 09:21:39 -0600 From: Dan Nelson To: Sheldon Hearn Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Specififying IPFW unpriveleged port ranges with a mask Message-ID: <20011121152139.GB48921@dan.emsphone.com> References: <20011120213335.GA44741@dan.emsphone.com> <31572.1006340446@axl.seasidesoftware.co.za> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31572.1006340446@axl.seasidesoftware.co.za> User-Agent: Mutt/1.3.23.2i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Nov 21), Sheldon Hearn said: > > > On Tue, 20 Nov 2001 15:33:35 CST, Dan Nelson wrote: > > > To store a port range or port:mask, ipfw uses 2 entries in the ports > > array to store lo+hi, or port+mask, and sets a bit in the rule's > > 'flags' field saying "first 2 ports are a range / mask". > > Oookay. So using a mask isn't going to be more efficient? It's more efficient by a single if(), since it comes first in /sys/netinet/ip_fw.c:port_match(), but that's it :) -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message