aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-net/CHANGELOG.md2
-rw-r--r--embassy-net/Cargo.toml4
-rw-r--r--embassy-net/src/dns.rs6
-rw-r--r--embassy-net/src/lib.rs6
4 files changed, 14 insertions, 4 deletions
diff --git a/embassy-net/CHANGELOG.md b/embassy-net/CHANGELOG.md
index ada34cb75..0319a5ed4 100644
--- a/embassy-net/CHANGELOG.md
+++ b/embassy-net/CHANGELOG.md
@@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8## Unreleased 8## Unreleased
9 9
10- Avoid never resolving `TcpIo::read` when the output buffer is empty. 10- Avoid never resolving `TcpIo::read` when the output buffer is empty.
11- Update to `smoltcp` git.
12- Forward constants from `smoltcp` in DNS query results so changing DNS result size in `smoltcp` properly propagates.
11 13
12## 0.2.1 - 2023-10-31 14## 0.2.1 - 2023-10-31
13 15
diff --git a/embassy-net/Cargo.toml b/embassy-net/Cargo.toml
index 0b029bd3c..ef66078cb 100644
--- a/embassy-net/Cargo.toml
+++ b/embassy-net/Cargo.toml
@@ -25,7 +25,7 @@ features = ["nightly", "defmt", "tcp", "udp", "dns", "dhcpv4", "proto-ipv6", "me
25default = [] 25default = []
26std = [] 26std = []
27 27
28defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt"] 28defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt", "heapless/defmt-03"]
29 29
30nightly = ["dep:embedded-io-async", "dep:embedded-nal-async"] 30nightly = ["dep:embedded-io-async", "dep:embedded-nal-async"]
31 31
@@ -46,7 +46,7 @@ igmp = ["smoltcp/proto-igmp"]
46defmt = { version = "0.3", optional = true } 46defmt = { version = "0.3", optional = true }
47log = { version = "0.4.14", optional = true } 47log = { version = "0.4.14", optional = true }
48 48
49smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp", rev = "9b791ae3057e10f7afcb70c67deb5daf714293a9", default-features = false, features = [ 49smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp.git", rev = "b57e2f9e70e82a13f31d5ea17e55232c11cc2b2d", default-features = false, features = [
50 "socket", 50 "socket",
51 "async", 51 "async",
52] } 52] }
diff --git a/embassy-net/src/dns.rs b/embassy-net/src/dns.rs
index 6b804f9ed..69fc5cdf1 100644
--- a/embassy-net/src/dns.rs
+++ b/embassy-net/src/dns.rs
@@ -63,7 +63,11 @@ where
63 } 63 }
64 64
65 /// Make a query for a given name and return the corresponding IP addresses. 65 /// Make a query for a given name and return the corresponding IP addresses.
66 pub async fn query(&self, name: &str, qtype: DnsQueryType) -> Result<Vec<IpAddress, 1>, Error> { 66 pub async fn query(
67 &self,
68 name: &str,
69 qtype: DnsQueryType,
70 ) -> Result<Vec<IpAddress, { smoltcp::config::DNS_MAX_RESULT_COUNT }>, Error> {
67 self.stack.dns_query(name, qtype).await 71 self.stack.dns_query(name, qtype).await
68 } 72 }
69} 73}
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs
index b9315079a..6aa476aa0 100644
--- a/embassy-net/src/lib.rs
+++ b/embassy-net/src/lib.rs
@@ -494,7 +494,11 @@ impl<D: Driver> Stack<D> {
494 494
495 /// Make a query for a given name and return the corresponding IP addresses. 495 /// Make a query for a given name and return the corresponding IP addresses.
496 #[cfg(feature = "dns")] 496 #[cfg(feature = "dns")]
497 pub async fn dns_query(&self, name: &str, qtype: dns::DnsQueryType) -> Result<Vec<IpAddress, 1>, dns::Error> { 497 pub async fn dns_query(
498 &self,
499 name: &str,
500 qtype: dns::DnsQueryType,
501 ) -> Result<Vec<IpAddress, { smoltcp::config::DNS_MAX_RESULT_COUNT }>, dns::Error> {
498 // For A and AAAA queries we try detect whether `name` is just an IP address 502 // For A and AAAA queries we try detect whether `name` is just an IP address
499 match qtype { 503 match qtype {
500 #[cfg(feature = "proto-ipv4")] 504 #[cfg(feature = "proto-ipv4")]