android: fix isExitNode check (#646)

&& takes precedence over ?:, so fix isExitNode to check both IPv4 and IPv6

Updates tailscale/tailscale#15785

Signed-off-by: kari-ts <kari@tailscale.com>
pull/653/head^2
kari-ts 7 months ago committed by GitHub
parent 7f56d0c0fe
commit e3c76eb812
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -105,7 +105,7 @@ class Tailcfg {
// isExitNode reproduces the Go logic in local.go peerStatusFromNode
val isExitNode: Boolean =
AllowedIPs?.contains("0.0.0.0/0") ?: false && AllowedIPs?.contains("::/0") ?: false
(AllowedIPs?.contains("0.0.0.0/0") ?: false) && (AllowedIPs?.contains("::/0") ?: false)
val isMullvadNode: Boolean
get() = Name.endsWith(".mullvad.ts.net.")

Loading…
Cancel
Save