Valid netmasks for nethash type IP sets?
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
Signature · 3 lines
---------------------------------------+-------------------------- Marcus Sundberg <[email protected]> | Firewalls with SIP & NAT Software Developer, Ingate Systems AB | http://www.ingate.com/
Quoted 4 lines · Marcus Sundberg
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 : [email protected], [email protected] 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