projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
95ad1f4
)
netfilter: ipset: Fix hash:* type expiration
author
Jozsef Kadlecsik
<
[email protected]
>
Sat, 7 Nov 2015 10:23:34 +0000
(11:23 +0100)
committer
Jozsef Kadlecsik
<
[email protected]
>
Sat, 7 Nov 2015 10:23:34 +0000
(11:23 +0100)
Incorrect index was used when the data blob was shrinked at expiration,
which could lead to falsely expired entries and memory leak when
the comment extension was used too.
Signed-off-by: Jozsef Kadlecsik <
[email protected]
>
net/netfilter/ipset/ip_set_hash_gen.h
patch
|
blob
|
history
diff --git
a/net/netfilter/ipset/ip_set_hash_gen.h
b/net/netfilter/ipset/ip_set_hash_gen.h
index 4ff22194ce5572ef32a06062c348ff8022676699..fa4f6374bb734b44fee49097dc87e3d07ec6d56f 100644
(file)
--- a/
net/netfilter/ipset/ip_set_hash_gen.h
+++ b/
net/netfilter/ipset/ip_set_hash_gen.h
@@
-523,7
+523,7
@@
mtype_expire(struct ip_set *set, struct htype *h, u8 nets_length, size_t dsize)
continue;
data = ahash_data(n, j, dsize);
memcpy(tmp->value + d * dsize, data, dsize);
- set_bit(
j
, tmp->used);
+ set_bit(
d
, tmp->used);
d++;
}
tmp->pos = d;