From 6c914409cd0300e04506d6f825f7e53e7ff7f3a2 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Thu, 10 Apr 2025 11:26:57 -0700 Subject: [PATCH] Revert "ipn/ipnstate: add home DERP to tailscale status JSON" This reverts commit 476a4c6ff174d46ce3b125c018c07c43713e1c10. Reason: redundant with `tailscale status --json | jq '.Self.Relay'` which we all forgot about. Whoops. Updates #15625 --- ipn/ipnstate/ipnstate.go | 3 --- wgengine/magicsock/magicsock.go | 12 ++++-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/ipn/ipnstate/ipnstate.go b/ipn/ipnstate/ipnstate.go index 4494afb67..89c6d7e24 100644 --- a/ipn/ipnstate/ipnstate.go +++ b/ipn/ipnstate/ipnstate.go @@ -53,9 +53,6 @@ type Status struct { // If nil, an exit node is not in use. ExitNodeStatus *ExitNodeStatus `json:"ExitNodeStatus,omitempty"` - // DERPHomeRegionID is the current home DERP region ID. - DERPHomeRegionID int - // Health contains health check problems. // Empty means everything is good. (or at least that no known // problems are detected) diff --git a/wgengine/magicsock/magicsock.go b/wgengine/magicsock/magicsock.go index e7e65b6ee..a32867f72 100644 --- a/wgengine/magicsock/magicsock.go +++ b/wgengine/magicsock/magicsock.go @@ -2892,15 +2892,11 @@ func (c *Conn) UpdateStatus(sb *ipnstate.StatusBuilder) { }) } - sb.MutateStatus(func(s *ipnstate.Status) { - s.DERPHomeRegionID = c.myDerp - c.foreachActiveDerpSortedLocked(func(node int, ad activeDerp) { - // TODO(bradfitz): add a method to ipnstate.StatusBuilder - // to include all the DERP connections we have open - // and add it here. See the other caller of foreachActiveDerpSortedLocked. - }) + c.foreachActiveDerpSortedLocked(func(node int, ad activeDerp) { + // TODO(bradfitz): add a method to ipnstate.StatusBuilder + // to include all the DERP connections we have open + // and add it here. See the other caller of foreachActiveDerpSortedLocked. }) - } // SetStatistics specifies a per-connection statistics aggregator.