From: Amin Azez Subject: Re: xtables Re: Hacking iptables 1.3.5 for 2.6.17 Date: Fri, 30 Jun 2006 17:28:06 +0100 Message-ID: <44A55116.9080107@ufomechanic.net> References: <200606300948.k5U9mNot001866@toshiba.co.jp> <44A50091.7070003@ufomechanic.net> <200606301157.k5UBvJTl016149@toshiba.co.jp> <44A51BCB.7090006@ufomechanic.net> <44A53794.6060405@trash.net> <44A5496C.3030504@ufomechanic.net> <44A54C65.20906@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: netfilter-devel@lists.netfilter.org Return-path: To: Patrick McHardy In-Reply-To: <44A54C65.20906@trash.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-devel-bounces@lists.netfilter.org Errors-To: netfilter-devel-bounces@lists.netfilter.org List-Id: netfilter-devel.vger.kernel.org Patrick McHardy wrote: > Amin Azez wrote: >> To my surprise I'm getting checkinfo called lots of times, I thought it >> would only be called once when a new rule was being accepted >> kernel-side. Do you know why it would be called many times (with the >> same value matchinfo pointer) > > It gets called whenever you add a new rule. Thats a result of the > atomic-exchange of the entire ruleset, each "generation" of your > ruleset (while adding rules incrementally) is an entirely new > ruleset to the kernel. iptables -Z dsrateentries -t mangle causes the checkentry to all be called again. (It just so happens I was doing that every 10 seconds) I guess iptables -z is not as lightweight as I thought, it perhaps re-applies all the rules - or maybe checkentry is wrongly being called from -z? Or maybe checkentry can do more these days and I need to check why it is called Sam