diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2012-01-13 22:55:54 +0100 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2012-01-13 22:55:54 +0100 |
commit | 64f47a74c303ba53a306e6ad4cd0c7f40a165eea (patch) | |
tree | f1a01473f210ec19de2c419a391723438f1a0718 | |
parent | 24b35d0b8950407ce85eefef18576d54f1e2c20e (diff) | |
download | ipset-64f47a74c303ba53a306e6ad4cd0c7f40a165eea.tar.gz |
hash:net,iface timeout bug fixed
Timed out entries were still matched till the garbage collector
purged them out. The fix is verified in the testsuite.
-rw-r--r-- | kernel/include/linux/netfilter/ipset/ip_set_ahash.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/include/linux/netfilter/ipset/ip_set_ahash.h b/kernel/include/linux/netfilter/ipset/ip_set_ahash.h index 0e5c3cf..05a5d72 100644 --- a/kernel/include/linux/netfilter/ipset/ip_set_ahash.h +++ b/kernel/include/linux/netfilter/ipset/ip_set_ahash.h @@ -1005,9 +1005,17 @@ type_pf_ttest_cidrs(struct ip_set *set, struct type_pf_elem *d, u32 timeout) n = hbucket(t, key); for (i = 0; i < n->pos; i++) { data = ahash_tdata(n, i); +#ifdef IP_SET_HASH_WITH_MULTI + if (type_pf_data_equal(data, d, &multi)) { + if (!type_pf_data_expired(data)) + return type_pf_data_match(data); + multi = 0; + } +#else if (type_pf_data_equal(data, d, &multi) && !type_pf_data_expired(data)) return type_pf_data_match(data); +#endif } } return 0; |