Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184125
b: refs/heads/master
c: 89bc7a0
h: refs/heads/master
i:
  184123: ada55b3
v: v3
  • Loading branch information
Jan Engelhardt authored and Patrick McHardy committed Jan 4, 2010
1 parent ac53d24 commit 0024469
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: 71c3ebfdb27b50dcaef38b6f70da82b9142c5fb6
refs/heads/master: 89bc7a0f64de7bed2e0bc68a23d75699a610cd37
8 changes: 4 additions & 4 deletions trunk/net/netfilter/xt_hashlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ struct xt_hashlimit_htable {
struct hlist_node node; /* global list of all htables */
atomic_t use;
u_int8_t family;
bool rnd_initialized;

struct hashlimit_cfg1 cfg; /* config */

/* used internally */
spinlock_t lock; /* lock for list_head */
u_int32_t rnd; /* random seed for hash */
int rnd_initialized;
unsigned int count; /* number entries in table */
struct timer_list timer; /* timer for gc */

Expand Down Expand Up @@ -150,7 +150,7 @@ dsthash_alloc_init(struct xt_hashlimit_htable *ht,
* the first hashtable entry */
if (!ht->rnd_initialized) {
get_random_bytes(&ht->rnd, sizeof(ht->rnd));
ht->rnd_initialized = 1;
ht->rnd_initialized = true;
}

if (ht->cfg.max && ht->count >= ht->cfg.max) {
Expand Down Expand Up @@ -235,7 +235,7 @@ static int htable_create_v0(struct xt_hashlimit_info *minfo, u_int8_t family)
atomic_set(&hinfo->use, 1);
hinfo->count = 0;
hinfo->family = family;
hinfo->rnd_initialized = 0;
hinfo->rnd_initialized = false;
spin_lock_init(&hinfo->lock);
hinfo->pde = proc_create_data(minfo->name, 0,
(family == NFPROTO_IPV4) ?
Expand Down Expand Up @@ -296,7 +296,7 @@ static int htable_create(struct xt_hashlimit_mtinfo1 *minfo, u_int8_t family)
atomic_set(&hinfo->use, 1);
hinfo->count = 0;
hinfo->family = family;
hinfo->rnd_initialized = 0;
hinfo->rnd_initialized = false;
spin_lock_init(&hinfo->lock);

hinfo->pde = proc_create_data(minfo->name, 0,
Expand Down

0 comments on commit 0024469

Please sign in to comment.