From 0c11cefc040f98bab5c88a254768a30fba75f280 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 8 Jun 2026 15:35:30 +0000 Subject: [PATCH] fix: return error instead of silently ignoring invalid dhcp_cidr in launcher --- easytier/src/launcher.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/easytier/src/launcher.rs b/easytier/src/launcher.rs index bfd1164b..ef18a9cf 100644 --- a/easytier/src/launcher.rs +++ b/easytier/src/launcher.rs @@ -638,9 +638,10 @@ impl NetworkConfig { cfg.set_hostname(self.hostname.clone()); cfg.set_dhcp(self.dhcp.unwrap_or_default()); if let Some(ref dhcp_cidr) = self.dhcp_cidr { - if let Ok(cidr) = dhcp_cidr.parse::() { - cfg.set_dhcp_cidr(Some(cidr)); - } + let cidr = dhcp_cidr.parse::().with_context(|| { + format!("failed to parse dhcp_cidr: {}", dhcp_cidr) + })?; + cfg.set_dhcp_cidr(Some(cidr)); } cfg.set_inst_name(self.network_name.clone().unwrap_or_default());