From: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [ANNOUNCE] new iptables module match large amount of ip addresses
Date: Fri, 18 Sep 2009 01:01:22 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0909180054410.21427@artax.karlin.mff.cuni.cz> (raw)
In-Reply-To: <alpine.LSU.2.00.0909180046410.20781@obet.zrqbmnf.qr>
On Fri, 18 Sep 2009, Jan Engelhardt wrote:
> On Thursday 2009-09-17 21:15, Mikulas Patocka wrote:
> >
> >Here I submit an iptables module that can match large amounts (millions)
> >of ip addresses efficiently using binary search.
>
> So you just reinvented xt_geoip...
I am wondering, if there are two approaches for matching large amounts of
addresses (xt_geoip and ipset), why is none of them in the kernel?
I was saying how OpenBSD is better than Linux because OpenBSD has
tree-based firewall tables --- hmm --- well --- Linux has them too, except
that noone can really find them because they are not in the kernel.
> >- fast matching of large amount of ip addresses using binary search.
> >- an ability to match ranges of addresses or address/mask subnets.
> >- fast loading of the addresses (on Pentium 3 850, 2 million addresses
> >load in 5.5s, if they are already sorted in the file, the load time is
> >just 1.5s).
> >- memory efficient --- consumes only 8 bytes per address.
>
> xt_geoip uses less than that -- 8 bytes per range. Of course it depends
> on the data, but on the average, since large netblocks is used, it's
> much better than 8 per address.
My code uses 8 bytes per range too, not really per address.
Mikulas
next prev parent reply other threads:[~2009-09-17 23:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-17 19:15 [ANNOUNCE] new iptables module match large amount of ip addresses Mikulas Patocka
2009-09-17 20:03 ` Eric Leblond
2009-09-17 20:36 ` Mikulas Patocka
2009-09-17 22:50 ` Jan Engelhardt
2009-09-17 23:01 ` Mikulas Patocka [this message]
2009-09-17 23:33 ` Jan Engelhardt
2009-09-17 23:46 ` Mikulas Patocka
2009-09-17 23:05 ` Fred Moyer
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=Pine.LNX.4.64.0909180054410.21427@artax.karlin.mff.cuni.cz \
--to=mikulas@artax.karlin.mff.cuni.cz \
--cc=jengelh@medozas.de \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).