Skip to content
Snippets Groups Projects
Commit de71731d authored by Karel Slaný's avatar Karel Slaný
Browse files

Merge branch 'cache-rrsig-wip' of gitlab.labs.nic.cz:knot/resolver into cache-rrsig-wip

parents aaa8c2e3 d6ed957a
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,7 @@ static bool is_paired_to_query(const knot_pkt_t *answer, struct kr_query *query)
const knot_dname_t *qname = minimized_qname(query, &qtype);
return query->id == knot_wire_get_id(answer->wire) &&
knot_wire_get_qdcount(answer->wire) > 0 &&
(query->sclass == KNOT_CLASS_ANY || query->sclass == knot_pkt_qclass(answer)) &&
qtype == knot_pkt_qtype(answer) &&
knot_dname_is_equal(qname, knot_pkt_qname(answer));
......
......@@ -104,7 +104,9 @@ class Entry:
answer.use_edns(query.edns, query.ednsflags)
if 'copy_id' in self.adjust_fields:
answer.id = query.id
answer.question[0].name = query.question[0].name
# Copy letter-case if the template has QD
if len(answer.question) > 0:
answer.question[0].name = query.question[0].name
if 'copy_query' in self.adjust_fields:
answer.question = query.question
return answer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment