All of lore.kernel.org
 help / color / mirror / Atom feed
From: Massimiliano Hofer <max@nucleus.it>
To: Patrick McHardy <kaber@trash.net>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: condition for 2.6.16
Date: Fri, 28 Apr 2006 14:44:50 +0200	[thread overview]
Message-ID: <200604281444.50982.max@nucleus.it> (raw)
In-Reply-To: <4451F745.4070900@trash.net>

On Friday 28 April 2006 1:06 pm, Patrick McHardy wrote:

> > I'll set to work on it. I'll need to change the userspace interface,
> > though. The only O(1) way to do it is to store a pointer (or any other
> > id) in the rule itself. I didn't do it in the previous version because I
> > though this was really ugly. I can't find any other match doing a similar
> > thing. Anyway I can do it.
>
> Unfortunately its ugly, but this is a well-known limitation of iptables
> itself. Since its the only way to do certain things, I won't complain
> if this part is ugly :)

OK. This time I warned you. :)

> > On the other hand I can make it a guaranteed O(log n) or average O(1)
> > without meddling the rule descriptor and with compatible userspace. What
> > do you prefer?
>
> How would you achieve O(1) average?

Hash. But it adds complexity to the code and unnecessary complexity is a form 
of ugliness.

While we're talking about varying degrees of ugliness, how bad would it be if 
I optionally allowed to keep a persistent state across rule removal and 
reinsertion (for example whene someone flushes the table and restarts the 
firewalling script)?
I concede that this would really be easy to do in userspace, so maybe I'm 
answering myself. :)

-- 
Saluti,
   Massimiliano Hofer
        Nucleus

  reply	other threads:[~2006-04-28 12:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-20 17:19 condition for 2.6.16 Massimiliano Hofer
2006-04-20 18:49 ` Patrick McHardy
2006-04-20 19:39   ` Massimiliano Hofer
2006-04-20 19:44     ` Martijn Lievaart
2006-04-20 22:47     ` Patrick McHardy
2006-04-20 23:26       ` Massimiliano Hofer
2006-04-21  0:41         ` Gerd v. Egidy
2006-04-21  0:48         ` Gerd v. Egidy
2006-04-21  9:29           ` Amin Azez
2006-04-23 13:47   ` Simon Lodal
2006-04-28  7:12     ` Patrick McHardy
2006-04-28 10:46       ` Massimiliano Hofer
2006-04-28 11:06         ` Patrick McHardy
2006-04-28 12:44           ` Massimiliano Hofer [this message]
2006-04-28 12:58             ` Jozsef Kadlecsik
2006-04-28 13:07               ` Patrick McHardy
2006-04-28 15:18                 ` KOVACS Krisztian
2006-04-28 15:34                   ` Patrick McHardy
2006-04-29  0:53                     ` Massimiliano Hofer
2006-04-29  2:56                       ` Patrick McHardy
2006-04-29 15:36                         ` Massimiliano Hofer
2006-04-28 13:18               ` Massimiliano Hofer
2006-04-28 13:09             ` Patrick McHardy
2006-04-28 13:26               ` Massimiliano Hofer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200604281444.50982.max@nucleus.it \
    --to=max@nucleus.it \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.