fix(server): clean up bridge and hybrid shutdown handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user