diff --git a/hscontrol/mapper/tail.go b/hscontrol/mapper/tail.go index f5225c84b26..1e67d8e6108 100644 --- a/hscontrol/mapper/tail.go +++ b/hscontrol/mapper/tail.go @@ -137,8 +137,6 @@ func tailNode( PrimaryRoutes: primaryPrefixes, - LastSeen: node.LastSeen, - Online: &online, MachineAuthorized: !node.IsExpired(), } @@ -170,13 +168,19 @@ func tailNode( tNode.Capabilities = append(tNode.Capabilities, tailcfg.NodeAttrDisableUPnP) } - // TODO(kradalby): .Online is only available from capVer 18. - if online { - tNode.Online = &online - } else { + // .Online is only available from capVer 18. + if capVer < 18 { // LastSeen is only set when node is // not connected to the control server. tNode.LastSeen = node.LastSeen + } else { + if online { + tNode.Online = &online + } else { + // LastSeen is only set when node is + // not connected to the control server. + tNode.LastSeen = node.LastSeen + } } return &tNode, nil