Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Nov 2001 09:21:39 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Sheldon Hearn <sheldonh@starjuice.net>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Specififying IPFW unpriveleged port ranges with a mask
Message-ID:  <20011121152139.GB48921@dan.emsphone.com>
In-Reply-To: <31572.1006340446@axl.seasidesoftware.co.za>
References:  <20011120213335.GA44741@dan.emsphone.com> <31572.1006340446@axl.seasidesoftware.co.za>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011121152139.GB48921>