From: Wouter Wijngaards Date: Mon, 3 Dec 2018 14:50:47 +0000 (+0000) Subject: - cache-max-ttl also defines upperbound of initial TTL in response. X-Git-Tag: release-1.9.0rc1~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=198a7ce74dce1eb78b6f5e038f784a1cf732d71f;p=thirdparty%2Funbound.git - cache-max-ttl also defines upperbound of initial TTL in response. git-svn-id: file:///svn/unbound/trunk@5007 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 55ea5246e..6b5b32f0b 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,7 @@ 3 December 2018: Wouter - Fix icon, no ragged edges and nicer resolutions available, for eg. Win 7 and Windows 10 display. + - cache-max-ttl also defines upperbound of initial TTL in response. 30 November 2018: Wouter - Patch for typo in unbound.conf man page. diff --git a/util/data/msgreply.c b/util/data/msgreply.c index 6e5cd7c4d..32aec4bf4 100644 --- a/util/data/msgreply.c +++ b/util/data/msgreply.c @@ -195,6 +195,8 @@ rdata_copy(sldns_buffer* pkt, struct packed_rrset_data* data, uint8_t* to, } if(*rr_ttl < MIN_TTL) *rr_ttl = MIN_TTL; + if(*rr_ttl > MAX_TTL) + *rr_ttl = MAX_TTL; if(*rr_ttl < data->ttl) data->ttl = *rr_ttl;