summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrew Dunham <andrew@du.nham.ca>2023-01-23 14:51:33 -0500
committerAndrew Dunham <andrew@du.nham.ca>2023-01-23 14:51:33 -0500
commit7be80d2a1c346770b1b6f574c0746ad4098f3f15 (patch)
tree2aa44675616171cc6e1f788fdc5b4cbd50430cc2
parentb74db24149b0d594486803b7fac02b78f1fd387c (diff)
downloadtailscale-andrew/peer-status-KeyExpiry.tar.xz
tailscale-andrew/peer-status-KeyExpiry.zip
ipn: add KeyExpiry to PeerStatusandrew/peer-status-KeyExpiry
Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I9466ff3d3d92b64255b694394a4b5b508da074a5
-rw-r--r--ipn/ipnlocal/local.go1
-rw-r--r--ipn/ipnstate/ipnstate.go4
2 files changed, 5 insertions, 0 deletions
diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go
index 7e9da9f12..f2fea2404 100644
--- a/ipn/ipnlocal/local.go
+++ b/ipn/ipnlocal/local.go
@@ -720,6 +720,7 @@ func peerStatusFromNode(ps *ipnstate.PeerStatus, n *tailcfg.Node) {
ps.PrimaryRoutes = &v
}
+ ps.KeyExpiry = n.KeyExpiry
if n.Expired {
ps.Expired = true
}
diff --git a/ipn/ipnstate/ipnstate.go b/ipn/ipnstate/ipnstate.go
index 7e4f31847..9894c94f2 100644
--- a/ipn/ipnstate/ipnstate.go
+++ b/ipn/ipnstate/ipnstate.go
@@ -247,6 +247,10 @@ type PeerStatus struct {
// In theory, all of InNetworkMap and InMagicSock and InEngine should all be true.
InEngine bool
+ // KeyExpiry is the time that this peer's node key will or has expired.
+ // This will be the zero time for nodes that do not expire.
+ KeyExpiry time.Time `json:",omitempty"`
+
// Expired means that this peer's node key has expired, based on either
// information from control or optimisically set on the client if the
// expiration time has passed.