diff options
Diffstat (limited to 'util/data/msgparse.c')
| -rw-r--r-- | util/data/msgparse.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/util/data/msgparse.c b/util/data/msgparse.c index 6963d850171e..afbcbca5bc9d 100644 --- a/util/data/msgparse.c +++ b/util/data/msgparse.c @@ -1361,3 +1361,15 @@ msgparse_rrset_remove_rr(const char* str, sldns_buffer* pkt, struct rrset_parse* * the rr->next works fine to continue. */ return rrset->rr_count == 0; } + +#ifdef UNBOUND_DEBUG +time_t debug_expired_reply_ttl_calc(time_t ttl, time_t ttl_add) { + /* Check that we are serving expired when this is called */ + /* ttl (absolute) should be later than ttl_add */ + /* It is also called during the grace period for type DNAME, + * and then the 'SERVE_EXPIRED' boolean may not be on. */ + log_assert(ttl_add <= ttl); + return (SERVE_EXPIRED_REPLY_TTL < (ttl) - (ttl_add) ? + SERVE_EXPIRED_REPLY_TTL : (ttl) - (ttl_add)); +} +#endif |
