mirror of
https://github.com/tailscale/tailscale.git
synced 2026-06-03 21:01:54 +08:00
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:
parent
54619c135a
commit
993cd567c9
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
16
cmd/tailscale/cli/routecheck_disabled.go
Normal file
16
cmd/tailscale/cli/routecheck_disabled.go
Normal 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
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user