diff --git a/mantis/src/detection/ml/server_ports.rs b/mantis/src/detection/ml/server_ports.rs index 050d89a..e616c97 100644 --- a/mantis/src/detection/ml/server_ports.rs +++ b/mantis/src/detection/ml/server_ports.rs @@ -124,11 +124,12 @@ pub fn is_non_unicast(ip: &str) -> bool { }; match addr { IpAddr::V4(v4) => { - v4.is_multicast() // 224.0.0.0/4 - || v4.is_broadcast() // 255.255.255.255 - || 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.is_multicast() // 224.0.0.0/4 + || v4.is_broadcast() // 255.255.255.255 + || 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