Skip to content

Commit

Permalink
fix: lokup ip
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscaOrtegaG committed Oct 10, 2024
1 parent 613a228 commit 180b18e
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/async_resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,15 @@ impl AsyncResolver {
}
})
.collect();

// Verify if any of the returned IPs matches the expected domain's IP
match ip_addresses {
Ok(ips) => {
if ips.contains(&self.expected_ip_for_domain(domain_name)) {
Ok(ips) // Return IPs if they match
} else {
Err(ClientError::TemporaryError("Resolved IP does not match the queried domain IP"))
}
Ok(ips)
}
Err(e) => Err(e),
}
});
}

fn expected_ip_for_domain(&self, domain_name: &str) -> IpAddr {

}

/// Performs a DNS lookup of the given domain name, qtype and rclass.
///
Expand Down

0 comments on commit 180b18e

Please sign in to comment.