feature/conn25: return unavailable from connector PeerAPI when conn25

not configured

We want all hooks and handlers to do as little as possible if the node
is not configured for conn25 or has no configured apps.

Updates tailscale/corp#39033

Signed-off-by: Michael Ben-Ami <mzb@tailscale.com>
This commit is contained in:
Michael Ben-Ami
2026-07-28 12:14:53 -04:00
committed by mzbenami
parent 122ed8a44f
commit 8b338c984a

View File

@@ -100,6 +100,9 @@ func handleConnectorTransitIP(h ipnlocal.PeerAPIHandler, w http.ResponseWriter,
http.Error(w, "miswired", http.StatusInternalServerError)
return
}
if !e.conn25.isConfigured() {
http.Error(w, "conn25 not configured", http.StatusServiceUnavailable)
}
e.handleConnectorTransitIP(h, w, r)
}