Skip to content

Commit

Permalink
fix privacy changes for correct functionality of resolver_cache_test.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jotape24 committed Dec 31, 2024
1 parent 01dffd1 commit bbe723a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/async_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use std::collections::HashMap;
#[derive(Clone)]
pub struct AsyncResolver {
/// Cache for the resolver
cache: Arc<Mutex<ResolverCache>>,
pub cache: Arc<Mutex<ResolverCache>>,
/// Configuration for the resolver.
config: ResolverConfig,
}
Expand Down Expand Up @@ -233,7 +233,7 @@ impl AsyncResolver {
/// assert!(response.is_ok());
/// ```
/// TODO: Refactor to use the three caches
async fn inner_lookup(
pub async fn inner_lookup(
&self,
domain_name: DomainName,
rrtype: Rrtype,
Expand Down Expand Up @@ -338,7 +338,7 @@ impl AsyncResolver {
/// in the response or the cache is preferred, but the two should never be
/// combined. If the data in the response is from authoritative data in the
/// answer section, it is always preferred.
fn store_data_cache(&self, response: DnsMessage) {
pub fn store_data_cache(&self, response: DnsMessage) {
let truncated = response.get_header().get_tc();
{
let mut cache = self.cache.lock().unwrap();
Expand Down Expand Up @@ -381,7 +381,7 @@ impl AsyncResolver {
/// the SOA controls the length of time that the negative result may be
/// cached.
#[allow(unused)]
fn save_negative_answers(&self, response: DnsMessage) {
pub fn save_negative_answers(&self, response: DnsMessage) {
let qname = response.get_question().get_qname();
let qtype = response.get_question().get_rrtype();
let qclass = response.get_question().get_rclass();
Expand Down

0 comments on commit bbe723a

Please sign in to comment.