summaryrefslogtreecommitdiff
path: root/sys/netinet/ipsec_output.c
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2015-06-11 15:59:18 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2015-06-11 15:59:18 +0000
commit771837ae081d675267bc2b832d98eb0d20854f5f (patch)
treec67e1b25338fa45dc46f2565995ff8982e8ffeac /sys/netinet/ipsec_output.c
parentaecfb8a3ee0564f82deb1b8a8f0e87771e0ee47a (diff)
Move away from using hzto(9); OK dlg
Diffstat (limited to 'sys/netinet/ipsec_output.c')
-rw-r--r--sys/netinet/ipsec_output.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c
index b6bb4510f3d..2ddd05d6269 100644
--- a/sys/netinet/ipsec_output.c
+++ b/sys/netinet/ipsec_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_output.c,v 1.58 2015/04/17 11:04:02 mikeb Exp $ */
+/* $OpenBSD: ipsec_output.c,v 1.59 2015/06/11 15:59:17 mikeb Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -65,7 +65,6 @@ int udpencap_port = 4500; /* triggers decapsulation */
int
ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready)
{
- struct timeval tv;
int i, off, error;
struct mbuf *mp;
#ifdef INET6
@@ -135,18 +134,12 @@ ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready)
*/
if (tdb->tdb_first_use == 0) {
tdb->tdb_first_use = time_second;
-
- tv.tv_usec = 0;
-
- tv.tv_sec = tdb->tdb_first_use + tdb->tdb_exp_first_use;
if (tdb->tdb_flags & TDBF_FIRSTUSE)
- timeout_add(&tdb->tdb_first_tmo,
- hzto(&tv));
-
- tv.tv_sec = tdb->tdb_first_use + tdb->tdb_soft_first_use;
+ timeout_add_sec(&tdb->tdb_first_tmo,
+ tdb->tdb_exp_first_use);
if (tdb->tdb_flags & TDBF_SOFT_FIRSTUSE)
- timeout_add(&tdb->tdb_sfirst_tmo,
- hzto(&tv));
+ timeout_add_sec(&tdb->tdb_sfirst_tmo,
+ tdb->tdb_soft_first_use);
}
/*