summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_spd.c
diff options
context:
space:
mode:
authorcheloha <cheloha@cvs.openbsd.org>2018-10-22 15:32:20 +0000
committercheloha <cheloha@cvs.openbsd.org>2018-10-22 15:32:20 +0000
commit118fae76bd8258bcbbb2758eb76bc098a24b71c8 (patch)
treeb8742d6153c4c09d125a44676210ddb0fbe22e3b /sys/netinet/ip_spd.c
parent0cb46c690090c85e99684cf873cc8065c0d66cf1 (diff)
ipsec: use monotonic clock for SA creation/lookup timestamps; ok dlg@
Diffstat (limited to 'sys/netinet/ip_spd.c')
-rw-r--r--sys/netinet/ip_spd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c
index b1b69e446e1..076534ac184 100644
--- a/sys/netinet/ip_spd.c
+++ b/sys/netinet/ip_spd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_spd.c,v 1.98 2018/06/25 11:11:41 mpi Exp $ */
+/* $OpenBSD: ip_spd.c,v 1.99 2018/10/22 15:32:19 cheloha Exp $ */
/*
* The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu)
*
@@ -437,7 +437,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction,
if (ipo->ipo_last_searched <= ipsec_last_added) {
/* "Touch" the entry. */
if (dignore == 0)
- ipo->ipo_last_searched = time_second;
+ ipo->ipo_last_searched = time_uptime;
/* Find an appropriate SA from the existing ones. */
ipo->ipo_tdb =
@@ -541,7 +541,7 @@ ipsp_spd_lookup(struct mbuf *m, int af, int hlen, int *error, int direction,
/* Find whether there exists an appropriate SA. */
if (ipo->ipo_last_searched <= ipsec_last_added) {
if (dignore == 0)
- ipo->ipo_last_searched = time_second;
+ ipo->ipo_last_searched = time_uptime;
ipo->ipo_tdb =
gettdbbysrc(rdomain,