From: Willem Toorop Date: Sat, 3 Jun 2023 13:08:41 +0000 (+0200) Subject: ldns-testns match wildcard qname's X-Git-Tag: testns-1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67b9f0ae98910df882ca77f503673929a9e1db9b;p=thirdparty%2Fldns.git ldns-testns match wildcard qname's Currently only in combination with copy_query (for simulating delegations) --- diff --git a/examples/ldns-testpkts.c b/examples/ldns-testpkts.c index c67a8259..033b9601 100644 --- a/examples/ldns-testpkts.c +++ b/examples/ldns-testpkts.c @@ -764,9 +764,13 @@ find_match(struct entry* entries, ldns_pkt* query_pkt, continue; } if(p->match_qname) { - if(!get_owner(query_pkt) || !get_owner(reply) || - ldns_dname_compare( - get_owner(query_pkt), get_owner(reply)) != 0) { + if (!get_owner(query_pkt) || !get_owner(reply) + || ( !p->copy_query + && ldns_dname_compare( get_owner(query_pkt) + , get_owner(reply))) + || ( p->copy_query + && !ldns_dname_match_wildcard( get_owner(query_pkt) + , get_owner(reply)))) { verbose(3, "bad qname\n"); continue; }