projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f2deb6
)
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
Greg Kroah-Hartman
<gregkh@suse.de>
Mon, 15 Mar 2010 15:50:01 +0000
(08:50 -0700)
commit
8ccb92ad41cb311e52ad1b1fe77992c7f47a3b63
upstream.
A rule with a zero hit_count will always match.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/netfilter/xt_recent.c
patch
|
blob
|
history
diff --git
a/net/netfilter/xt_recent.c
b/net/netfilter/xt_recent.c
index d940a6367c7a8ced424d8c042d81c2f908dbb20d..1a3b6508060ec5b4c865c85f92b865bef57dbae0 100644
(file)
--- a/
net/netfilter/xt_recent.c
+++ b/
net/netfilter/xt_recent.c
@@
-260,7
+260,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;
}