Skip to content
Snippets Groups Projects
Commit ee2cce4d authored by Marek Vavruša's avatar Marek Vavruša
Browse files

lib/iterate: pair stype/m12n stype as well

parent c4b51e3d
Branches
Tags
No related merge requests found
......@@ -50,7 +50,7 @@ static const knot_dname_t *minimized_qname(struct kr_query *query, uint16_t *qty
{
/* Minimization disabled. */
const knot_dname_t *qname = query->sname;
if (query->flags & (QUERY_NO_MINIMIZE|QUERY_CACHED)) {
if (query->flags & QUERY_NO_MINIMIZE) {
return qname;
}
......@@ -75,11 +75,11 @@ static bool is_paired_to_query(const knot_pkt_t *answer, struct kr_query *query)
{
uint16_t qtype = query->stype;
const knot_dname_t *qname = minimized_qname(query, &qtype);
return query->id == knot_wire_get_id(answer->wire) &&
(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));
(qtype == knot_pkt_qtype(answer) || query->stype == knot_pkt_qtype(answer)) &&
(knot_dname_is_equal(qname, knot_pkt_qname(answer)) ||
knot_dname_is_equal(query->sname, knot_pkt_qname(answer)));
}
/** Relaxed rule for AA, either AA=1 or SOA matching zone cut is required. */
......
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