Suppress reporting for illegal states
This commit is contained in:
@@ -68,8 +68,10 @@ data class IpNeighbour(val ip: InetAddress, val dev: String, val lladdr: MacAddr
|
|||||||
if (match.groups[4] != null) try {
|
if (match.groups[4] != null) try {
|
||||||
lladdr = MacAddressCompat.fromString(match.groupValues[5])
|
lladdr = MacAddressCompat.fromString(match.groupValues[5])
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: IllegalArgumentException) {
|
||||||
|
if (state != State.INCOMPLETE && state != State.DELETING) {
|
||||||
Timber.w(IOException("Failed to find MAC address for $line", e))
|
Timber.w(IOException("Failed to find MAC address for $line", e))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// use ARP as fallback for IPv4, except for INCOMPLETE which by definition does not have arp entry,
|
// use ARP as fallback for IPv4, except for INCOMPLETE which by definition does not have arp entry,
|
||||||
// or for DELETING, which we do not care about MAC not present
|
// or for DELETING, which we do not care about MAC not present
|
||||||
if (ip is Inet4Address && lladdr == MacAddressCompat.ALL_ZEROS_ADDRESS && state != State.INCOMPLETE &&
|
if (ip is Inet4Address && lladdr == MacAddressCompat.ALL_ZEROS_ADDRESS && state != State.INCOMPLETE &&
|
||||||
|
|||||||
Reference in New Issue
Block a user