From 3c012efbead6ac7bfab2acacca8bc255599b6282 Mon Sep 17 00:00:00 2001 From: damocles Date: Sun, 31 May 2026 21:17:12 +0200 Subject: [PATCH] fix(#883): warn + bail on unparseable subnet instead of silently writing empty LOCAL_ADDRESS; doc /0 corner case --- hive-c0re/src/lifecycle.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hive-c0re/src/lifecycle.rs b/hive-c0re/src/lifecycle.rs index 5f1139eb..1cfdfa83 100644 --- a/hive-c0re/src/lifecycle.rs +++ b/hive-c0re/src/lifecycle.rs @@ -101,6 +101,8 @@ pub fn agent_network_ip(name: &str, subnet_cidr: &str) -> Option { let prefix_len: u32 = prefix_str.parse().ok()?; if prefix_len > 30 { // /31 and /32 have no room for agents; /30 has 1 usable slot. + // /0 (the other extreme) is handled further down: host_count + // overflows checked_shl(32) → 0 → usable = 0 → None. return None; } // Parse dotted-decimal IPv4.