|
@@ -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;
|
|
|
+ /* 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) {
|
|
|
- /* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies *
|
|
|
- 128. */
|
|
|
- priv->prev = jiffies;
|
|
|
- priv->credit = user2credits(r->avg * r->burst); /* Credits full. */
|
|
|
r->credit_cap = priv->credit; /* Credits full. */
|
|
|
r->cost = user2credits(r->avg);
|
|
|
}
|