2
0
mirror of https://github.com/Revertron/Alfis synced 2024-11-17 03:25:43 +00:00

Fixed resolve of CNAME records.

This commit is contained in:
Revertron 2021-04-02 03:24:53 +02:00
parent 164a6ef219
commit e1d0df33d5

View File

@ -60,8 +60,9 @@ impl DnsFilter for BlockchainFilter {
Ok(data) => { data }
};
let mut answers: Vec<DnsRecord> = Vec::new();
let a_record = qtype == QueryType::A || qtype == QueryType::AAAA;
for mut record in data.records.iter_mut() {
if record.get_querytype() == qtype {
if record.get_querytype() == qtype || (a_record && record.get_querytype() == QueryType::CNAME) {
match &mut record {
DnsRecord::A { domain, .. }
| DnsRecord::AAAA { domain, .. }