Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34703
b: refs/heads/master
c: 57dab5d
h: refs/heads/master
i:
  34701: 2080586
  34699: 889a627
  34695: 8d63a24
  34687: 8d46736
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Sep 22, 2006
1 parent 13d08aa commit 0c459bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ecb70c95c45ece0935b076295388267f6d8db65c
refs/heads/master: 57dab5d0bfee21663ed20222b4cedeb0655ba1f3
16 changes: 8 additions & 8 deletions trunk/net/netfilter/xt_limit.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ ipt_limit_checkentry(const char *tablename,
return 0;
}

/* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies *
128. */
r->prev = jiffies;
r->credit = user2credits(r->avg * r->burst); /* Credits full. */
r->credit_cap = user2credits(r->avg * r->burst); /* Credits full. */
r->cost = user2credits(r->avg);

/* For SMP, we only want to use one set of counters. */
r->master = r;

if (r->cost == 0) {
/* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies *
128. */
r->prev = jiffies;
r->credit = user2credits(r->avg * r->burst); /* Credits full. */
r->credit_cap = user2credits(r->avg * r->burst); /* Credits full. */
r->cost = user2credits(r->avg);
}
return 1;
}

Expand Down

0 comments on commit 0c459bd

Please sign in to comment.