Skip to content

state,change,mapper: report LastSeen for online peers per tailcfg protocol - #3420

Open
zicochaos wants to merge 1 commit into
juanfont:mainfrom
zicochaos:fix-3415-lastseen-online-peers
Open

state,change,mapper: report LastSeen for online peers per tailcfg protocol#3420
zicochaos wants to merge 1 commit into
juanfont:mainfrom
zicochaos:fix-3415-lastseen-online-peers

Conversation

@zicochaos

Copy link
Copy Markdown

tailcfg documents Node.LastSeen as "when the node was last online … nil if never been online", and PeerChange.LastSeen as accompanying online-status changes. headscale only sent LastSeen for offline peers and never included it in online/offline patches, so clients on the new InitialStatus + peer-delta code path (Tailscale 1.102 on Apple platforms, tailscale/tailscale@6bf05cb63) saw online peers as never-online — rendering exit nodes as offline in the GUI.

  • emit LastSeen for online peers in TailNode, per tailcfg semantics
  • set LastSeen on connect/disconnect in State and carry it in the NodeOnline/NodeOffline change patches

Covered by a new servertest regression test and updated change/mapper tests. Note: this alone does not fix the empty exit-node list from #3415 — that turned out to be the GUI requiring a suggested exit node; see the issue for analysis and a policy (nodeAttrs) workaround.

Updates #3415

…tocol

Tailscale 1.102 switched the Apple GUI to InitialStatus + peer deltas
and the GUI hides exit nodes it considers offline. headscale only sent
LastSeen for offline peers and never included it in online/offline
patches, so the new GUI treated every peer as never-online and hid all
exit nodes from the list, while the CLI kept working.

- emit LastSeen for online peers in TailNode, per tailcfg docs
  ("when the node was last online ... nil if never been online")
- set LastSeen on connect/disconnect in State and carry it in the
  NodeOnline/NodeOffline change patches

Updates juanfont#3415
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant