summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-01-22 01:45:57 +0000
committer/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org>2008-01-22 01:45:57 +0000
commit9e0585bb826cf7bb879ed3ad68a26767d3e33379 (patch)
tree11ce4dae40dbe8a383897140f2b97ecb15342e70
parent0adf963ed6cca5f1b096ff04f246d5e21e2ffe7b (diff)
fix inconsistent alarm update in cache_alarm_update
-rw-r--r--src/sync-alarm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sync-alarm.c b/src/sync-alarm.c
index f7a1536..66727e7 100644
--- a/src/sync-alarm.c
+++ b/src/sync-alarm.c
@@ -57,7 +57,9 @@ static void cache_alarm_add(struct us_conntrack *u, void *data)
static void cache_alarm_update(struct us_conntrack *u, void *data)
{
struct alarm_list *alarm = data;
- add_alarm(alarm, random() % CONFIG(refresh) + 1, random() % 999999 + 1);
+ add_alarm(alarm,
+ random() % CONFIG(refresh) + 1,
+ ((random() % 5 + 1) * 200000) - 1);
}
static void cache_alarm_destroy(struct us_conntrack *u, void *data)