summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2008-09-10 14:01:24 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2008-09-10 14:01:24 +0000
commit33d64896abc9e79070ec22125a832e7d8ef87878 (patch)
tree1f2297f6ceb3127f1cc36b8d9c89baeeceb16922 /sys/netinet
parent528af50e90df2cf2ebdf638dc4d94752c1861936 (diff)
Convert timeout_add() calls using multiples of hz to timeout_add_sec()
Really just the low-hanging fruit of (hopefully) forthcoming timeout conversions. ok art@, krw@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/if_ether.c6
-rw-r--r--sys/netinet/ip_ipsp.c6
-rw-r--r--sys/netinet/ip_spd.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index 60d0ec86fd1..b1edb2a8097 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ether.c,v 1.75 2008/06/06 13:29:43 henning Exp $ */
+/* $OpenBSD: if_ether.c,v 1.76 2008/09/10 14:01:23 blambert Exp $ */
/* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */
/*
@@ -120,7 +120,7 @@ arptimer(arg)
struct llinfo_arp *la, *nla;
s = splsoftnet();
- timeout_add(to, arpt_prune * hz);
+ timeout_add_sec(to, arpt_prune);
for (la = LIST_FIRST(&llinfo_arp); la != LIST_END(&llinfo_arp);
la = nla) {
struct rtentry *rt = la->la_rt;
@@ -160,7 +160,7 @@ arp_rtrequest(req, rt, info)
}
timeout_set(&arptimer_to, arptimer, &arptimer_to);
- timeout_add(&arptimer_to, hz);
+ timeout_add_sec(&arptimer_to, 1);
}
if (rt->rt_flags & RTF_GATEWAY) {
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index 307aa0ab529..c0e7486c3c0 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipsp.c,v 1.171 2008/04/18 06:42:20 djm Exp $ */
+/* $OpenBSD: ip_ipsp.c,v 1.172 2008/09/10 14:01:23 blambert Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr),
@@ -262,8 +262,8 @@ reserve_spi(u_int32_t sspi, u_int32_t tspi, union sockaddr_union *src,
if (ipsec_keep_invalid > 0) {
tdbp->tdb_flags |= TDBF_TIMER;
tdbp->tdb_exp_timeout = ipsec_keep_invalid;
- timeout_add(&tdbp->tdb_timer_tmo,
- hz * ipsec_keep_invalid);
+ timeout_add_sec(&tdbp->tdb_timer_tmo,
+ ipsec_keep_invalid);
}
return spi;
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c
index a9414995ae9..921f7b84b42 100644
--- a/sys/netinet/ip_spd.c
+++ b/sys/netinet/ip_spd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_spd.c,v 1.57 2008/07/22 09:26:39 bluhm Exp $ */
+/* $OpenBSD: ip_spd.c,v 1.58 2008/09/10 14:01:23 blambert Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -877,7 +877,7 @@ ipsp_acquire_sa(struct ipsec_policy *ipo, union sockaddr_union *gw,
return 0;
}
- timeout_add(&ipa->ipa_timeout, ipsec_expire_acquire * hz);
+ timeout_add_sec(&ipa->ipa_timeout, ipsec_expire_acquire);
TAILQ_INSERT_TAIL(&ipsec_acquire_head, ipa, ipa_next);
TAILQ_INSERT_TAIL(&ipo->ipo_acquires, ipa, ipa_ipo_next);