From: W.C.A. Wijngaards Date: Wed, 12 May 2021 15:24:03 +0000 (+0200) Subject: - Fix that auth-zone zonefiles use last TTL if no TTL is specified. X-Git-Tag: release-1.13.2rc1~169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9aa072d115c8e5123ba3ea8766946c19f1b5ecb0;p=thirdparty%2Funbound.git - Fix that auth-zone zonefiles use last TTL if no TTL is specified. --- diff --git a/doc/Changelog b/doc/Changelog index ac3a9c390..aaa1561e0 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,6 @@ +12 May 2021: Wouter + - Fix that auth-zone zonefiles use last TTL if no TTL is specified. + 10 May 2021: Wouter - Merge PR #487: ifdef RLIMIT_AS in recently added check. diff --git a/sldns/str2wire.c b/sldns/str2wire.c index 70eec6dab..401625728 100644 --- a/sldns/str2wire.c +++ b/sldns/str2wire.c @@ -929,6 +929,10 @@ int sldns_fp2wire_rr_buf(FILE* in, uint8_t* rr, size_t* len, size_t* dname_len, memmove(parse_state->prev_rr, rr, *dname_len); parse_state->prev_rr_len = (*dname_len); } + if(r == LDNS_WIREPARSE_ERR_OK && parse_state) { + parse_state->default_ttl = sldns_wirerr_get_ttl( + rr, *len, *dname_len); + } return r; } return LDNS_WIREPARSE_ERR_OK;