Skip to content
Snippets Groups Projects
Commit ac9d08b9 authored by Lubos Slovak's avatar Lubos Slovak
Browse files

Fixed merging to stub RRSet in IXFR-in.

- If all RDATA have been removed from a RRSet, but the RRSet was
  not removed because RRSIGs remained, and new RDATA added to this
  RRSet had different TTL, the TTL from the old RRSet was used.
  This was fixed by rewriting the TTL by the TTL fo the new RRSet.

refs @1963 @30m
parent 7a3617fa
Branches
Tags
No related merge requests found
......@@ -2000,6 +2000,16 @@ dbg_xfrin_exec_detail(
dbg_xfrin_detail("RDATA in RRSet1: %p, RDATA in RRSet2: %p\n",
(*rrset)->rdata, add->rdata);
/* In case the RRSet is empty (and only remained there because of the
* RRSIGs, it may happen that the TTL may be different than that of
* the new RRs. Update the TTL according to the first RR.
*/
if (knot_rrset_rdata(*rrset) == NULL
&& knot_rrset_ttl(*rrset) != knot_rrset_ttl(add)) {
knot_rrset_set_ttl(*rrset, knot_rrset_ttl(add));
}
ret = knot_rrset_merge((void **)rrset, (void **)&add);
if (ret != KNOT_EOK) {
dbg_xfrin("Failed to merge changeset RRSet.\n");
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment