Use smoltcp constant in results from DNS

This commit is contained in:
Emil Fresk
2023-11-14 08:31:02 +01:00
parent ef69f386ab
commit fd670a9ae5
2 changed files with 10 additions and 2 deletions

View File

@ -63,7 +63,11 @@ where
}
/// Make a query for a given name and return the corresponding IP addresses.
pub async fn query(&self, name: &str, qtype: DnsQueryType) -> Result<Vec<IpAddress, 1>, Error> {
pub async fn query(
&self,
name: &str,
qtype: DnsQueryType,
) -> Result<Vec<IpAddress, { smoltcp::config::DNS_MAX_RESULT_COUNT }>, Error> {
self.stack.dns_query(name, qtype).await
}
}