in set_hashsize
796
797 printk(KERN_INFO "netflow: allocating new hash table %u -> %u buckets\n",
798 ipt_netflow_hash_size, new_size);
799 new_hash = alloc_hashtable(sizeof(struct list_head) * new_size);
800 if (!new_hash)
801 return -ENOMEM;
this part allocate more ram because alloc_hashtable has inside multilayer on sizeof(struct list_head)
799 new_hash = alloc_hashtable(sizeof(struct list_head) * new_size);
774 static struct hlist_head *alloc_hashtable(int size)
775 {
776 struct hlist_head *hash;
777
778 hash = vmalloc(sizeof(struct list_head) * size);
779 if (hash) {
780 int i;
781
782 for (i = 0; i < size; i++)
783 INIT_HLIST_HEAD(&hash[i]);
784 } else
785 printk(KERN_ERR "netflow: unable to vmalloc hash table.\n");
786
787 return hash;
788 }
799 new_hash = alloc_hashtable(sizeof(struct list_head) * new_size);
must be changed to
799 new_hash = alloc_hashtable(new_size);
You are very right, thanks!
ps. 'multilayer' probably you mean 'multiplier'? Please say more clearly next time, it is very hard to understand you.
pps. Also I just noticed, it should be allocated not sizeof(struct list_head) but sizeof(struct hlist_head), which is smaller size.
Commited both changes into cvs.
sorry my English not so good and also in fire-fox some plugin present witch make auto check and fix of english words, so it make some stupid changes some times.