fix: catch subnet-directed broadcast in is_non_unicast guard

This commit is contained in:
ParrotXray 2026-05-29 04:05:45 +00:00
parent 0973f61bfe
commit 4a417a94fd

View File

@ -129,6 +129,7 @@ pub fn is_non_unicast(ip: &str) -> bool {
|| v4.is_loopback() // 127.0.0.0/8
|| v4.is_unspecified() // 0.0.0.0
|| v4.is_link_local() // 169.254.0.0/16
|| v4.octets()[3] == 255 // subnet-directed broadcast (x.x.x.255)
}
IpAddr::V6(v6) => {
v6.is_multicast() // ff00::/8