Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ccb92ad authored by Tim Gardner's avatar Tim Gardner Committed by Patrick McHardy
Browse files

netfilter: xt_recent: fix false match



A rule with a zero hit_count will always match.

Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
Cc: stable@kernel.org
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 2c08522e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
			}