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:
2c08522
)
netfilter: xt_recent: fix false match
author
Tim Gardner
<tim.gardner@canonical.com>
Tue, 23 Feb 2010 13:59:12 +0000
(14:59 +0100)
committer
Patrick McHardy
<kaber@trash.net>
Tue, 23 Feb 2010 13:59:12 +0000
(14:59 +0100)
A rule with a zero hit_count will always match.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Cc: stable@kernel.org
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/xt_recent.c
patch
|
blob
|
history
diff --git
a/net/netfilter/xt_recent.c
b/net/netfilter/xt_recent.c
index 1278f0aa7434f8d0dc4d9fc900a3faed90fb412c..7073dbb8100c83fb163498453d814beed8fd2dbe 100644
(file)
--- a/
net/netfilter/xt_recent.c
+++ b/
net/netfilter/xt_recent.c
@@
-267,7
+267,7
@@
recent_mt(const struct sk_buff *skb, const struct xt_match_param *par)
for (i = 0; i < e->nstamps; i++) {
if (info->seconds && time_after(time, e->stamps[i]))
continue;
- if (++hits >= info->hit_count) {
+ if (
info->hit_count &&
++hits >= info->hit_count) {
ret = !ret;
break;
}