From ef69f386ab1c44c2e2813f8bf934e7440e09852a Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Tue, 14 Nov 2023 08:30:39 +0100 Subject: [PATCH 1/3] Update smoltcp and fix errors from that --- embassy-net/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 default = [] std = [] -defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt"] +defmt = ["dep:defmt", "smoltcp/defmt", "embassy-net-driver/defmt", "heapless/defmt-03"] nightly = ["dep:embedded-io-async", "dep:embedded-nal-async"] @@ -46,7 +46,7 @@ igmp = ["smoltcp/proto-igmp"] defmt = { version = "0.3", optional = true } log = { version = "0.4.14", optional = true } -smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp", rev = "9b791ae3057e10f7afcb70c67deb5daf714293a9", default-features = false, features = [ +smoltcp = { git = "https://github.com/smoltcp-rs/smoltcp.git", rev = "b57e2f9e70e82a13f31d5ea17e55232c11cc2b2d", default-features = false, features = [ "socket", "async", ] } From fd670a9ae527b534293eb692273285d7a1221cdd Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Tue, 14 Nov 2023 08:31:02 +0100 Subject: [PATCH 2/3] Use smoltcp constant in results from DNS --- embassy-net/src/dns.rs | 6 +++++- embassy-net/src/lib.rs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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 } /// Make a query for a given name and return the corresponding IP addresses. - pub async fn query(&self, name: &str, qtype: DnsQueryType) -> Result, Error> { + pub async fn query( + &self, + name: &str, + qtype: DnsQueryType, + ) -> Result, Error> { self.stack.dns_query(name, qtype).await } } 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 Stack { /// Make a query for a given name and return the corresponding IP addresses. #[cfg(feature = "dns")] - pub async fn dns_query(&self, name: &str, qtype: dns::DnsQueryType) -> Result, dns::Error> { + pub async fn dns_query( + &self, + name: &str, + qtype: dns::DnsQueryType, + ) -> Result, dns::Error> { // For A and AAAA queries we try detect whether `name` is just an IP address match qtype { #[cfg(feature = "proto-ipv4")] From a2c440ef8c8dcc863c5d017f9a2545b3f0f8c8f1 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Tue, 14 Nov 2023 08:45:24 +0100 Subject: [PATCH 3/3] Update changelog --- embassy-net/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) 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 ## Unreleased - Avoid never resolving `TcpIo::read` when the output buffer is empty. +- Update to `smoltcp` git. +- Forward constants from `smoltcp` in DNS query results so changing DNS result size in `smoltcp` properly propagates. ## 0.2.1 - 2023-10-31