cmd/tailscale: don't surface IPv6 addresses in UI

Fixes tailscale/tailscale#1158

Signed-off-by: Elias Naur <mail@eliasnaur.com>
pull/6/head
Elias Naur 4 years ago
parent b1395cfefb
commit 1c93c0f2c7

@ -653,6 +653,10 @@ func (ui *UI) layoutPeer(gtx layout.Context, sysIns system.Insets, p *UIPeer, cl
layout.Rigid(func(gtx C) D {
var addrs []string
for _, addr := range p.Peer.Addresses {
if addr.IP.Is6() {
// Don't surface IPv6 addresses.
continue
}
addrs = append(addrs, addr.IP.String())
}
l := material.Body2(ui.theme, strings.Join(addrs, ","))

Loading…
Cancel
Save