diff options
author | Cy Schubert <cy@FreeBSD.org> | 2019-12-28 05:27:06 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2019-12-28 05:27:06 +0000 |
commit | e2fe726866d062155f6b1aae749375475ef19191 (patch) | |
tree | fe6b00611d5c987d2c12c32063891ae19295ffeb /iterator/iterator.c | |
parent | 366b94c4a9552acfb560d3234aea0955ebc1eb8e (diff) |
Diffstat (limited to 'iterator/iterator.c')
-rw-r--r-- | iterator/iterator.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/iterator/iterator.c b/iterator/iterator.c index c906c27144831..1e0113a8740ff 100644 --- a/iterator/iterator.c +++ b/iterator/iterator.c @@ -409,6 +409,8 @@ iter_prepend(struct iter_qstate* iq, struct dns_msg* msg, num_an = 0; for(p = iq->an_prepend_list; p; p = p->next) { sets[num_an++] = p->rrset; + if(ub_packed_rrset_ttl(p->rrset) < msg->rep->ttl) + msg->rep->ttl = ub_packed_rrset_ttl(p->rrset); } memcpy(sets+num_an, msg->rep->rrsets, msg->rep->an_numrrsets * sizeof(struct ub_packed_rrset_key*)); @@ -421,6 +423,8 @@ iter_prepend(struct iter_qstate* iq, struct dns_msg* msg, msg->rep->ns_numrrsets, p->rrset)) continue; sets[msg->rep->an_numrrsets + num_an + num_ns++] = p->rrset; + if(ub_packed_rrset_ttl(p->rrset) < msg->rep->ttl) + msg->rep->ttl = ub_packed_rrset_ttl(p->rrset); } memcpy(sets + num_an + msg->rep->an_numrrsets + num_ns, msg->rep->rrsets + msg->rep->an_numrrsets, |