fixup! ipn/ipnlocal: use routecheck reports to make exit node suggestions

Shim out the localclient.RouteCheckProbe call for ts_omit_routecheck.

Signed-off-by: Simon Law <sfllaw@tailscale.com>
This commit is contained in:
Simon Law 2026-05-30 19:06:45 -07:00
parent 54619c135a
commit 993cd567c9
No known key found for this signature in database
GPG Key ID: B83D1EE07548341D
3 changed files with 22 additions and 1 deletions

View File

@ -159,7 +159,7 @@ func runExitNodeList(ctx context.Context, args []string) error {
func runExitNodeSuggest(ctx context.Context, args []string) error {
if exitNodeArgs.probe && buildfeatures.HasRouteCheck {
// Force a routecheck probe before suggesting an exit node.
if _, err := localClient.RouteCheckProbe(ctx); err != nil {
if err := routeCheckProbe(ctx); err != nil {
return fmt.Errorf("suggest exit node: routecheck: %w", err)
}
}

View File

@ -119,3 +119,8 @@ func printRouteCheckReport(rp *routecheck.Report) error {
fmt.Fprintln(w)
return nil
}
func routeCheckProbe(ctx context.Context) error {
_, err := localClient.RouteCheckProbe(ctx)
return err
}

View File

@ -0,0 +1,16 @@
// Copyright (c) Tailscale Inc & contributors
// SPDX-License-Identifier: BSD-3-Clause
//go:build ts_omit_routecheck
package cli
import (
"context"
"tailscale.com/feature"
)
func routeCheckProbe(ctx context.Context) error {
return feature.ErrUnavailable
}