fix(server): clean up bridge and hybrid shutdown handling

This commit is contained in:
2026-04-06 10:15:37 +00:00
parent a293986d6d
commit d4bad38908
5 changed files with 111 additions and 13 deletions

View File

@@ -319,10 +319,12 @@ fn extract_peer_vpn_ip(allowed_ips: &[AllowedIp]) -> Option<Ipv4Addr> {
}
}
}
// Fallback: use the first IPv4 address from any prefix length
// Fallback: use the first non-unspecified IPv4 address from any prefix length
for aip in allowed_ips {
if let IpAddr::V4(v4) = aip.addr {
return Some(v4);
if !v4.is_unspecified() {
return Some(v4);
}
}
}
None