On Tue, 18 Nov 2008, JC Janos wrote: > >From the ipset "tips & examples" , > > If you want a fixed size iphash type of set, then define it with > zero valued resize parameter: > ipset -N foo iphash --resize 0 > > Would this be used for a constant/unchanging ipset, e.g. containing 25 > IPs that won't be addded to or changed dynamically? Similar to > OpenBSD's pf "const" table construct, > > table <XXX> const { ip1, ip2, ..., ipN } No, of course not: you are free to add or delete entries from a fixed size hash anytime. > Also, Does hashsize literally correspond to # of entries? So, 25 > entries would need only hashsize=25? No, not at all. It can easily happen that in spite of having free slots in the hash those cannot be used: the hash value computed from the elemet to be stored points to a hash slot already occupied. So if you want to store exactly 25 elements in a fixed size hash, do not set hashsize to 25 but something larger, say 30. Experiment! :-) Best regards, Jozsef - E-mail : kadlec@xxxxxxxxxxxxxxxxx, kadlec@xxxxxxxxxxxx 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 -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html