All of lore.kernel.org
 help / color / mirror / Atom feed
* Valid netmasks for nethash type IP sets?
@ 2005-06-21 14:23 Marcus Sundberg
  2005-06-22  6:40 ` Jozsef Kadlecsik
  0 siblings, 1 reply; 2+ messages in thread
From: Marcus Sundberg @ 2005-06-21 14:23 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Jozsef Kadlecsik

Hi,

is there any particular implementation detail behind the reason why
the nethash set rejects the special case of /32 and /0 ? I would find
it quite convenient if the nethash set was able to store "networks"
consisting of a single address as well as the "everything" network.

//Marcus
-- 
---------------------------------------+--------------------------
  Marcus Sundberg <marcus@ingate.com>  | Firewalls with SIP & NAT
 Software Developer, Ingate Systems AB |  http://www.ingate.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Valid netmasks for nethash type IP sets?
  2005-06-21 14:23 Valid netmasks for nethash type IP sets? Marcus Sundberg
@ 2005-06-22  6:40 ` Jozsef Kadlecsik
  0 siblings, 0 replies; 2+ messages in thread
From: Jozsef Kadlecsik @ 2005-06-22  6:40 UTC (permalink / raw)
  To: Marcus Sundberg; +Cc: netfilter-devel

On Tue, 21 Jun 2005, Marcus Sundberg wrote:

> is there any particular implementation detail behind the reason why
> the nethash set rejects the special case of /32 and /0 ? I would find
> it quite convenient if the nethash set was able to store "networks"
> consisting of a single address as well as the "everything" network.

/0 (or 0) cannot be stored in any ipset type because zero value means
"element not set". /32 cannot be stored in nethash due to the packing
algorithm: with the chosen method it was possible to store the network
address and netmask value together just in 32 bits. And for single
addresses you can use iphash anytime.

Best regards,
Jozsef
-
E-mail  : kadlec@blackhole.kfki.hu, kadlec@sunserv.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
          H-1525 Budapest 114, POB. 49, Hungary

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-22  6:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-21 14:23 Valid netmasks for nethash type IP sets? Marcus Sundberg
2005-06-22  6:40 ` Jozsef Kadlecsik

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.