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

Commit 392b4087 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'master' of git://1984.lsi.us.es/nf



Pablo Neira Ayuso says:

====================
If time allows, I'd appreciate if you can take the following fix
for the xt_limit match.

As Jan indicates, random things may occur while using the xt_limit
match due to use of uninitialized memory.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 5e19997a 82e6bfe2
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -117,11 +117,11 @@ static int limit_mt_check(const struct xt_mtchk_param *par)

	/* For SMP, we only want to use one set of state. */
	r->master = priv;
	if (r->cost == 0) {
	/* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies *
	   128. */
	priv->prev = jiffies;
	priv->credit = user2credits(r->avg * r->burst); /* Credits full. */
	if (r->cost == 0) {
		r->credit_cap = priv->credit; /* Credits full. */
		r->cost = user2credits(r->avg);
	}