Skip to content

Commit ed3f19e

Browse files
committed
Fix the ignore_unqualified_hostnames feature
Unqualified hostnames for A/AAAA queries were not properly filtered.
1 parent f09e843 commit ed3f19e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/resolver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ pub async fn get_cached_response_or_resolve(
208208
let synthesize_nxdomain = {
209209
if globals.ignore_unqualified_hostnames && tld.len() == packet_qname.len() {
210210
let (qtype, qclass) = dns::qtype_qclass(packet)?;
211-
qtype == dns::DNS_CLASS_INET
212-
&& (qclass == dns::DNS_TYPE_A || qclass == dns::DNS_TYPE_AAAA)
211+
qclass == dns::DNS_CLASS_INET
212+
&& (qtype == dns::DNS_TYPE_A || qtype == dns::DNS_TYPE_AAAA)
213213
} else if let Some(undelegated_list) = &globals.undelegated_list {
214214
undelegated_list.find(tld)
215215
} else {

0 commit comments

Comments
 (0)