chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resolved: use CLOCK_BOOTTIME instead of CLOCK_MONOTONIC when aging caches and timeing...
[elogind.git]
/
src
/
resolve
/
resolved-dns-cache.c
diff --git
a/src/resolve/resolved-dns-cache.c
b/src/resolve/resolved-dns-cache.c
index 7359dfa271973272637ca15f050b6e2538df090c..f7091f07bf4b5c18e1ba949ca6bd4a4fed548f32 100644
(file)
--- a/
src/resolve/resolved-dns-cache.c
+++ b/
src/resolve/resolved-dns-cache.c
@@
-153,7
+153,7
@@
void dns_cache_prune(DnsCache *c) {
break;
if (t <= 0)
break;
if (t <= 0)
- t = now(CLOCK_
MONOTONIC
);
+ t = now(CLOCK_
BOOTTIME
);
if (i->until > t)
break;
if (i->until > t)
break;
@@
-376,7
+376,7
@@
int dns_cache_put(DnsCache *c, DnsQuestion *q, int rcode, DnsAnswer *answer, uns
dns_cache_make_space(c, answer->n_rrs + q->n_keys);
if (timestamp <= 0)
dns_cache_make_space(c, answer->n_rrs + q->n_keys);
if (timestamp <= 0)
- timestamp = now(CLOCK_
MONOTONIC
);
+ timestamp = now(CLOCK_
BOOTTIME
);
/* Second, add in positive entries for all contained RRs */
for (i = 0; i < MIN(max_rrs, answer->n_rrs); i++) {
/* Second, add in positive entries for all contained RRs */
for (i = 0; i < MIN(max_rrs, answer->n_rrs); i++) {