summaryrefslogtreecommitdiffstats
path: root/tests/hash:net,port,net.t.list0
diff options
context:
space:
mode:
authorEric B Munson <emunson@akamai.com>2015-05-29 11:36:25 -0400
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2015-06-19 23:30:06 +0200
commiteb9af8fe6d4776242fea84f5228b46d903539146 (patch)
treed7578d91c40b1c228ddf7e354683362e7042e7c3 /tests/hash:net,port,net.t.list0
parent01a13aa4fe0cb668fc535d38d6f9383433923874 (diff)
Add element count to hash headers
It would be useful for userspace to query the size of an ipset hash, however, this data is not exposed to userspace outside of counting the number of member entries. This patch uses the attribute IPSET_ATTR_ELEMENTS to indicate the size in the the header that is exported to userspace. This field is then printed by the userspace tool for hashes. Because it is only meaningful for hashes to report their size, the output is conditional on the set type. To do this checking the MATCH_TYPENAME macro was moved to utils.h. The bulk of this patch changes the expected test suite to account for the change in output. Signed-off-by: Eric B Munson <emunson@akamai.com> Cc: Pablo Neira Ayuso <pablo@netfilter.org> Cc: Josh Hunt <johunt@akamai.com> Cc: netfilter-devel@vger.kernel.org Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'tests/hash:net,port,net.t.list0')
-rw-r--r--tests/hash:net,port,net.t.list03
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/hash:net,port,net.t.list0 b/tests/hash:net,port,net.t.list0
index 0d90e62..9f20e7d 100644
--- a/tests/hash:net,port,net.t.list0
+++ b/tests/hash:net,port,net.t.list0
@@ -1,8 +1,9 @@
Name: test
Type: hash:net,port,net
Header: family inet hashsize 1024 maxelem 65536 timeout x
-Size in memory: 17672
+Size in memory: 1288
References: 0
+Number of entries: 4
Members:
2.0.0.0/24,tcp:5,192.168.0.0/24 timeout x
2.0.0.0/24,tcp:5,192.168.0.0/25 timeout x