diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-23 14:16:30 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:27:43 -0400 |
commit | e6f689db51a789807edede411b32eb7c9e457948 (patch) | |
tree | 6ba28587853721dc617d7f71ab622ac54eb4cd9d | |
parent | 9afdb00c80b0b9c20435ce690b5287fa2434ef44 (diff) |
[NETFILTER]: Use setup_timer
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/bridge/netfilter/ebt_ulog.c | 4 | ||||
-rw-r--r-- | net/ipv4/netfilter/ipt_ULOG.c | 7 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_reasm.c | 7 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 5 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_expect.c | 4 | ||||
-rw-r--r-- | net/netfilter/nfnetlink_log.c | 5 | ||||
-rw-r--r-- | net/netfilter/xt_hashlimit.c | 4 |
7 files changed, 10 insertions, 26 deletions
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c index 259f5c370f3c..8b84cd40279e 100644 --- a/net/bridge/netfilter/ebt_ulog.c +++ b/net/bridge/netfilter/ebt_ulog.c | |||
@@ -297,9 +297,7 @@ static int __init ebt_ulog_init(void) | |||
297 | 297 | ||
298 | /* initialize ulog_buffers */ | 298 | /* initialize ulog_buffers */ |
299 | for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) { | 299 | for (i = 0; i < EBT_ULOG_MAXNLGROUPS; i++) { |
300 | init_timer(&ulog_buffers[i].timer); | 300 | setup_timer(&ulog_buffers[i].timer, ulog_timer, i); |
301 | ulog_buffers[i].timer.function = ulog_timer; | ||
302 | ulog_buffers[i].timer.data = i; | ||
303 | spin_lock_init(&ulog_buffers[i].lock); | 301 | spin_lock_init(&ulog_buffers[i].lock); |
304 | } | 302 | } |
305 | 303 | ||
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c index 57f51af35727..d26bbd2daaa9 100644 --- a/net/ipv4/netfilter/ipt_ULOG.c +++ b/net/ipv4/netfilter/ipt_ULOG.c | |||
@@ -376,11 +376,8 @@ static int __init ipt_ulog_init(void) | |||
376 | } | 376 | } |
377 | 377 | ||
378 | /* initialize ulog_buffers */ | 378 | /* initialize ulog_buffers */ |
379 | for (i = 0; i < ULOG_MAXNLGROUPS; i++) { | 379 | for (i = 0; i < ULOG_MAXNLGROUPS; i++) |
380 | init_timer(&ulog_buffers[i].timer); | 380 | setup_timer(&ulog_buffers[i].timer, ulog_timer, i); |
381 | ulog_buffers[i].timer.function = ulog_timer; | ||
382 | ulog_buffers[i].timer.data = i; | ||
383 | } | ||
384 | 381 | ||
385 | nflognl = netlink_kernel_create(NETLINK_NFLOG, ULOG_MAXNLGROUPS, NULL, | 382 | nflognl = netlink_kernel_create(NETLINK_NFLOG, ULOG_MAXNLGROUPS, NULL, |
386 | THIS_MODULE); | 383 | THIS_MODULE); |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index 721f02d7b7f6..347ab7608231 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
@@ -353,9 +353,7 @@ nf_ct_frag6_create(unsigned int hash, __be32 id, struct in6_addr *src, str | |||
353 | ipv6_addr_copy(&fq->saddr, src); | 353 | ipv6_addr_copy(&fq->saddr, src); |
354 | ipv6_addr_copy(&fq->daddr, dst); | 354 | ipv6_addr_copy(&fq->daddr, dst); |
355 | 355 | ||
356 | init_timer(&fq->timer); | 356 | setup_timer(&fq->timer, nf_ct_frag6_expire, (unsigned long)fq); |
357 | fq->timer.function = nf_ct_frag6_expire; | ||
358 | fq->timer.data = (long) fq; | ||
359 | spin_lock_init(&fq->lock); | 357 | spin_lock_init(&fq->lock); |
360 | atomic_set(&fq->refcnt, 1); | 358 | atomic_set(&fq->refcnt, 1); |
361 | 359 | ||
@@ -870,8 +868,7 @@ int nf_ct_frag6_init(void) | |||
870 | nf_ct_frag6_hash_rnd = (u32) ((num_physpages ^ (num_physpages>>7)) ^ | 868 | nf_ct_frag6_hash_rnd = (u32) ((num_physpages ^ (num_physpages>>7)) ^ |
871 | (jiffies ^ (jiffies >> 6))); | 869 | (jiffies ^ (jiffies >> 6))); |
872 | 870 | ||
873 | init_timer(&nf_ct_frag6_secret_timer); | 871 | setup_timer(&nf_ct_frag6_secret_timer, nf_ct_frag6_secret_rebuild, 0); |
874 | nf_ct_frag6_secret_timer.function = nf_ct_frag6_secret_rebuild; | ||
875 | nf_ct_frag6_secret_timer.expires = jiffies | 872 | nf_ct_frag6_secret_timer.expires = jiffies |
876 | + nf_ct_frag6_secret_interval; | 873 | + nf_ct_frag6_secret_interval; |
877 | add_timer(&nf_ct_frag6_secret_timer); | 874 | add_timer(&nf_ct_frag6_secret_timer); |
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index a74b205b272d..6f2aac1d01af 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -620,9 +620,8 @@ __nf_conntrack_alloc(const struct nf_conntrack_tuple *orig, | |||
620 | conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig; | 620 | conntrack->tuplehash[IP_CT_DIR_ORIGINAL].tuple = *orig; |
621 | conntrack->tuplehash[IP_CT_DIR_REPLY].tuple = *repl; | 621 | conntrack->tuplehash[IP_CT_DIR_REPLY].tuple = *repl; |
622 | /* Don't set timer yet: wait for confirmation */ | 622 | /* Don't set timer yet: wait for confirmation */ |
623 | init_timer(&conntrack->timeout); | 623 | setup_timer(&conntrack->timeout, death_by_timeout, |
624 | conntrack->timeout.data = (unsigned long)conntrack; | 624 | (unsigned long)conntrack); |
625 | conntrack->timeout.function = death_by_timeout; | ||
626 | read_unlock_bh(&nf_ct_cache_lock); | 625 | read_unlock_bh(&nf_ct_cache_lock); |
627 | 626 | ||
628 | return conntrack; | 627 | return conntrack; |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index ce70a6fc6bda..c31af29a4439 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -290,9 +290,7 @@ static void nf_conntrack_expect_insert(struct nf_conntrack_expect *exp) | |||
290 | master_help->expecting++; | 290 | master_help->expecting++; |
291 | list_add(&exp->list, &nf_conntrack_expect_list); | 291 | list_add(&exp->list, &nf_conntrack_expect_list); |
292 | 292 | ||
293 | init_timer(&exp->timeout); | 293 | setup_timer(&exp->timeout, expectation_timed_out, (unsigned long)exp); |
294 | exp->timeout.data = (unsigned long)exp; | ||
295 | exp->timeout.function = expectation_timed_out; | ||
296 | exp->timeout.expires = jiffies + master_help->helper->timeout * HZ; | 294 | exp->timeout.expires = jiffies + master_help->helper->timeout * HZ; |
297 | add_timer(&exp->timeout); | 295 | add_timer(&exp->timeout); |
298 | 296 | ||
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 0ae06561ae9a..d2c6aab6bb7a 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -158,10 +158,7 @@ instance_create(u_int16_t group_num, int pid) | |||
158 | /* needs to be two, since we _put() after creation */ | 158 | /* needs to be two, since we _put() after creation */ |
159 | atomic_set(&inst->use, 2); | 159 | atomic_set(&inst->use, 2); |
160 | 160 | ||
161 | init_timer(&inst->timer); | 161 | setup_timer(&inst->timer, nfulnl_timer, (unsigned long)inst); |
162 | inst->timer.function = nfulnl_timer; | ||
163 | inst->timer.data = (unsigned long)inst; | ||
164 | /* don't start timer yet. (re)start it with every packet */ | ||
165 | 162 | ||
166 | inst->peer_pid = pid; | 163 | inst->peer_pid = pid; |
167 | inst->group_num = group_num; | 164 | inst->group_num = group_num; |
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index eb932913693b..d3043fa32ebc 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c | |||
@@ -216,10 +216,8 @@ static int htable_create(struct xt_hashlimit_info *minfo, int family) | |||
216 | hinfo->pde->proc_fops = &dl_file_ops; | 216 | hinfo->pde->proc_fops = &dl_file_ops; |
217 | hinfo->pde->data = hinfo; | 217 | hinfo->pde->data = hinfo; |
218 | 218 | ||
219 | init_timer(&hinfo->timer); | 219 | setup_timer(&hinfo->timer, htable_gc, (unsigned long )hinfo); |
220 | hinfo->timer.expires = jiffies + msecs_to_jiffies(hinfo->cfg.gc_interval); | 220 | hinfo->timer.expires = jiffies + msecs_to_jiffies(hinfo->cfg.gc_interval); |
221 | hinfo->timer.data = (unsigned long )hinfo; | ||
222 | hinfo->timer.function = htable_gc; | ||
223 | add_timer(&hinfo->timer); | 221 | add_timer(&hinfo->timer); |
224 | 222 | ||
225 | spin_lock_bh(&hashlimit_lock); | 223 | spin_lock_bh(&hashlimit_lock); |