From owner-freebsd-net@FreeBSD.ORG Tue Sep 9 10:51:03 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E2C8616A4BF for ; Tue, 9 Sep 2003 10:51:03 -0700 (PDT) Received: from mail.iinet.net.au (mail-12.iinet.net.au [203.59.3.44]) by mx1.FreeBSD.org (Postfix) with SMTP id E7FEA43FAF for ; Tue, 9 Sep 2003 10:51:01 -0700 (PDT) (envelope-from tim@queens.unimelb.edu.au) Received: (qmail 15783 invoked from network); 9 Sep 2003 17:50:59 -0000 Received: from unknown (HELO queens.unimelb.edu.au) (203.217.40.141) by mail.iinet.net.au with SMTP; 9 Sep 2003 17:50:59 -0000 Date: Wed, 10 Sep 2003 03:51:00 +1000 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Tim Burgess To: freebsd-net@freebsd.org Content-Transfer-Encoding: 7bit In-Reply-To: Message-Id: <2C48594F-E2EE-11D7-9E24-000393BE2C60@queens.unimelb.edu.au> X-Mailer: Apple Mail (2.552) Subject: Re: how do I delete just one ipfw rule ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Sep 2003 17:51:04 -0000 Hi All, There would be no theoretical problem with adding syntax to ipfw(8) (and possibly to its kernel interface) to delete a particular rule would there? eg ipfw delete 1234.5 to delete the fifth instance of rule 1234? There is clearly a fixed order to the rules, since they apply in order. Not that I'm volunteering or anything, but yeah :) Tim On Wednesday, September 10, 2003, at 03:45 AM, Julian Elischer wrote: > > > On Tue, 9 Sep 2003, Josh Brooks wrote: > >> >> >> >> On Tue, 9 Sep 2003, Luigi Rizzo wrote: >> >>> no, it is not possible to delete them -- you have no way to tell >>> which rule to delete when multiple rules share the same number. >> >> Are there any plans to make ipfw more flexible by changing the 65535 >> to >> the next power of two ? So there are a lot more rules ? > > The rule number is only 16 bits long.. > > This is made use of in 'divert' where the rule number that caused the > divert is in the port-number field when you do a recvfrom(). > if you change this, it won't work.. > > On "sendto()" teh rule number is used to suggest where the packet > "re-enters" the filter. if you pass it back unchanged then > it reenters the filter at the next rule after the one that diverted > it.. > (i.e. where it left off) > > >> >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"