diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 2004-06-21 23:50:39 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 2004-06-21 23:50:39 +0000 |
commit | ee05a750df8c3f9f5d686affb4df7e316507797a (patch) | |
tree | 887af571215b85d480946bb169aafa0605c786db /sys/netinet/ip_spd.c | |
parent | e84c5b85eb5d0fc9af7eb3cdcc77a22eb07dec74 (diff) |
First step towards more sane time handling in the kernel -- this changes
things such that code that only need a second-resolution uptime or wall
time, and used to get that from time.tv_secs or mono_time.tv_secs now get
this from separate time_t globals time_second and time_uptime.
ok art@ niklas@ nordin@
Diffstat (limited to 'sys/netinet/ip_spd.c')
-rw-r--r-- | sys/netinet/ip_spd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/ip_spd.c b/sys/netinet/ip_spd.c index a8099ead19a..357a567cdf4 100644 --- a/sys/netinet/ip_spd.c +++ b/sys/netinet/ip_spd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_spd.c,v 1.49 2004/06/21 20:44:54 itojun Exp $ */ +/* $OpenBSD: ip_spd.c,v 1.50 2004/06/21 23:50:37 tholo Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -386,7 +386,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.tv_sec; + ipo->ipo_last_searched = time_second; /* Find an appropriate SA from the existing ones. */ ipo->ipo_tdb = @@ -500,7 +500,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.tv_sec; + ipo->ipo_last_searched = time_second; ipo->ipo_tdb = gettdbbysrc(dignore ? &ssrc : &ipo->ipo_dst, @@ -1005,7 +1005,7 @@ ipsp_spd_inp(struct mbuf *m, int af, int hlen, int *error, int direction, */ if (inp->inp_ipo->ipo_last_searched <= ipsec_last_added) { - inp->inp_ipo->ipo_last_searched = time.tv_sec; + inp->inp_ipo->ipo_last_searched = time_second; /* Do we have an SA already established ? */ if (gettdbbysrc(&inp->inp_ipo->ipo_dst, @@ -1058,7 +1058,7 @@ ipsp_spd_inp(struct mbuf *m, int af, int hlen, int *error, int direction, if (inp->inp_ipo != NULL) { if (inp->inp_ipo->ipo_last_searched <= ipsec_last_added) { - inp->inp_ipo->ipo_last_searched = time.tv_sec; + inp->inp_ipo->ipo_last_searched = time_second; /* Update, just in case. */ ipsec_update_policy(inp, inp->inp_ipo, af, |