Fixed sending SOA for records in hosts files.
This commit is contained in:
+4
-6
@@ -68,12 +68,10 @@ impl DnsFilter for HostsFilter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !packet.answers.is_empty() {
|
packet.header.authoritative_answer = true;
|
||||||
packet.header.authoritative_answer = true;
|
packet.questions.push(DnsQuestion::new(String::from(qname), qtype));
|
||||||
packet.questions.push(DnsQuestion::new(String::from(qname), qtype));
|
packet.authorities.push(DnsRecord::NS { domain: String::from("hosts"), host: String::from(NAME_SERVER), ttl: TransientTtl(600) });
|
||||||
packet.authorities.push(DnsRecord::NS { domain: String::from("hosts"), host: String::from(NAME_SERVER), ttl: TransientTtl(600) });
|
return Some(packet);
|
||||||
return Some(packet);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
None
|
||||||
|
|||||||
Reference in New Issue
Block a user