OpenCloudOS-Kernel/net/netfilter/ipset
Vishwanath Pai 7f4f7dd441 netfilter: ipset: ipset list may return wrong member count for set with timeout
Simple testcase:

$ ipset create test hash:ip timeout 5
$ ipset add test 1.2.3.4
$ ipset add test 1.2.2.2
$ sleep 5

$ ipset l
Name: test
Type: hash:ip
Revision: 5
Header: family inet hashsize 1024 maxelem 65536 timeout 5
Size in memory: 296
References: 0
Number of entries: 2
Members:

We return "Number of entries: 2" but no members are listed. That is
because mtype_list runs "ip_set_timeout_expired" and does not list the
expired entries, but set->elements is never upated (until mtype_gc
cleans it up later).

Reviewed-by: Joshua Hunt <johunt@akamai.com>
Signed-off-by: Vishwanath Pai <vpai@akamai.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2017-09-18 17:35:32 +02:00
..
Kconfig netfilter: ipset: hash:ipmac type support added to ipset 2016-11-10 13:28:49 +01:00
Makefile netfilter: ipset: hash:ipmac type support added to ipset 2016-11-10 13:28:49 +01:00
ip_set_bitmap_gen.h netfilter: Remove unnecessary cast on void pointer 2017-04-07 17:29:17 +02:00
ip_set_bitmap_ip.c netfilter: ipset: Fix extension alignment 2015-11-07 11:21:47 +01:00
ip_set_bitmap_ipmac.c netfilter: ipset: Check IPSET_ATTR_ETHER netlink attribute length 2016-03-08 20:36:17 +01:00
ip_set_bitmap_port.c netfilter: ipset: Fix extension alignment 2015-11-07 11:21:47 +01:00
ip_set_core.c netfilter: nfnetlink: extended ACK reporting 2017-06-19 19:38:24 +02:00
ip_set_getport.c sctp: remove the typedef sctp_sctphdr_t 2017-07-01 09:08:41 -07:00
ip_set_hash_gen.h netfilter: ipset: ipset list may return wrong member count for set with timeout 2017-09-18 17:35:32 +02:00
ip_set_hash_ip.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_hash_ipmac.c netfilter: ipset: hash: fix boolreturn.cocci warnings 2016-11-10 13:28:50 +01:00
ip_set_hash_ipmark.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_hash_ipport.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_hash_ipportip.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_hash_ipportnet.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_hash_mac.c netfilter: ipset: Check IPSET_ATTR_ETHER netlink attribute length 2016-03-08 20:36:17 +01:00
ip_set_hash_net.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_hash_netiface.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_hash_netnet.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_hash_netport.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_hash_netportnet.c netfilter: ipset: Make struct htype per ipset family 2016-11-10 13:28:48 +01:00
ip_set_list_set.c netfilter: ipset: Null pointer exception in ipset list:set 2017-02-19 19:08:47 +01:00
pfxlen.c netfilter: ipset: Fix coding styles reported by checkpatch.pl 2015-06-14 10:40:18 +02:00