mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-21 23:31:06 -05:00
don't accidentally increase repttl if it was small because of another (short-ttl) RRset in the reply. There would be cache replies trying to work with expired RRsets if this extra if wasn't there.
git-svn-id: file:///svn/unbound/trunk@4167 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
e1b6145e5c
commit
cf2da96a28
1 changed files with 6 additions and 4 deletions
|
|
@ -337,6 +337,7 @@ ipsecmod_handle_query(struct module_qstate* qstate,
|
||||||
for(i=0; i<rrset_data->count+rrset_data->rrsig_count; i++)
|
for(i=0; i<rrset_data->count+rrset_data->rrsig_count; i++)
|
||||||
rrset_data->rr_ttl[i] = qstate->env->cfg->ipsecmod_max_ttl;
|
rrset_data->rr_ttl[i] = qstate->env->cfg->ipsecmod_max_ttl;
|
||||||
/* Also update reply_info's TTL */
|
/* Also update reply_info's TTL */
|
||||||
|
if(qstate->return_msg->rep->ttl > (time_t)qstate->env->cfg->ipsecmod_max_ttl) {
|
||||||
qstate->return_msg->rep->ttl =
|
qstate->return_msg->rep->ttl =
|
||||||
qstate->env->cfg->ipsecmod_max_ttl;
|
qstate->env->cfg->ipsecmod_max_ttl;
|
||||||
qstate->return_msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(
|
qstate->return_msg->rep->prefetch_ttl = PREFETCH_TTL_CALC(
|
||||||
|
|
@ -344,6 +345,7 @@ ipsecmod_handle_query(struct module_qstate* qstate,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* Store A/AAAA in cache. */
|
/* Store A/AAAA in cache. */
|
||||||
if(!dns_cache_store(qstate->env, &qstate->qinfo,
|
if(!dns_cache_store(qstate->env, &qstate->qinfo,
|
||||||
qstate->return_msg->rep, 0, qstate->prefetch_leeway,
|
qstate->return_msg->rep, 0, qstate->prefetch_leeway,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue