Let the entries be unique
This commit is contained in:
@@ -80,6 +80,7 @@ data class IpNeighbour(val ip: InetAddress, val dev: String, val lladdr: MacAddr
|
|||||||
.asSequence()
|
.asSequence()
|
||||||
.filter { parseNumericAddress(it[ARP_IP_ADDRESS]) == ip && it[ARP_DEVICE] == dev }
|
.filter { parseNumericAddress(it[ARP_IP_ADDRESS]) == ip && it[ARP_DEVICE] == dev }
|
||||||
.map { it[ARP_HW_ADDRESS] }
|
.map { it[ARP_HW_ADDRESS] }
|
||||||
|
.distinct()
|
||||||
.singleOrNull() ?: throw IllegalArgumentException("singleOrNull"))
|
.singleOrNull() ?: throw IllegalArgumentException("singleOrNull"))
|
||||||
} catch (e: IllegalArgumentException) {
|
} catch (e: IllegalArgumentException) {
|
||||||
Timber.w(e)
|
Timber.w(e)
|
||||||
|
|||||||
Reference in New Issue
Block a user