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:
parent
164a6ef219
commit
e1d0df33d5
@ -60,8 +60,9 @@ impl DnsFilter for BlockchainFilter {
|
|||||||
Ok(data) => { data }
|
Ok(data) => { data }
|
||||||
};
|
};
|
||||||
let mut answers: Vec<DnsRecord> = Vec::new();
|
let mut answers: Vec<DnsRecord> = Vec::new();
|
||||||
|
let a_record = qtype == QueryType::A || qtype == QueryType::AAAA;
|
||||||
for mut record in data.records.iter_mut() {
|
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 {
|
match &mut record {
|
||||||
DnsRecord::A { domain, .. }
|
DnsRecord::A { domain, .. }
|
||||||
| DnsRecord::AAAA { domain, .. }
|
| DnsRecord::AAAA { domain, .. }
|
||||||
|
Loading…
Reference in New Issue
Block a user