mirror of
https://github.com/tailscale/tailscale.git
synced 2026-05-08 13:46:46 +02:00
feature/routecheck: add ts_omit_routecheck feature flag
RouteCheck, which checks that overlapping routers are reachable, is enabled by default for both tailscaled and tsnet. Updates #17366 Updates tailscale/corp#33033 Signed-off-by: Simon Law <sfllaw@tailscale.com>
This commit is contained in:
parent
ec0b23a21f
commit
d5955a102f
@ -303,6 +303,7 @@ tailscale.com/cmd/tailscaled dependencies: (generated by github.com/tailscale/de
|
||||
tailscale.com/feature/portmapper from tailscale.com/feature/condregister/portmapper
|
||||
tailscale.com/feature/posture from tailscale.com/feature/condregister
|
||||
tailscale.com/feature/relayserver from tailscale.com/feature/condregister
|
||||
tailscale.com/feature/routecheck from tailscale.com/feature/condregister
|
||||
L tailscale.com/feature/sdnotify from tailscale.com/feature/condregister
|
||||
LD tailscale.com/feature/ssh from tailscale.com/cmd/tailscaled
|
||||
tailscale.com/feature/syspolicy from tailscale.com/feature/condregister+
|
||||
|
||||
@ -202,6 +202,19 @@ func TestOmitPortlist(t *testing.T) {
|
||||
}.Check(t)
|
||||
}
|
||||
|
||||
func TestOmitRouteCheck(t *testing.T) {
|
||||
deptest.DepChecker{
|
||||
GOOS: "linux",
|
||||
GOARCH: "amd64",
|
||||
Tags: "ts_omit_routecheck,ts_include_cli",
|
||||
OnDep: func(dep string) {
|
||||
if strings.Contains(dep, "routecheck") {
|
||||
t.Errorf("unexpected dep: %q", dep)
|
||||
}
|
||||
},
|
||||
}.Check(t)
|
||||
}
|
||||
|
||||
func TestOmitGRO(t *testing.T) {
|
||||
deptest.DepChecker{
|
||||
GOOS: "linux",
|
||||
|
||||
13
feature/buildfeatures/feature_routecheck_disabled.go
Normal file
13
feature/buildfeatures/feature_routecheck_disabled.go
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Code generated by gen.go; DO NOT EDIT.
|
||||
|
||||
//go:build ts_omit_routecheck
|
||||
|
||||
package buildfeatures
|
||||
|
||||
// HasRouteCheck is whether the binary was built with support for modular feature "Support checking the reachability of overlapping routers".
|
||||
// Specifically, it's whether the binary was NOT built with the "ts_omit_routecheck" build tag.
|
||||
// It's a const so it can be used for dead code elimination.
|
||||
const HasRouteCheck = false
|
||||
13
feature/buildfeatures/feature_routecheck_enabled.go
Normal file
13
feature/buildfeatures/feature_routecheck_enabled.go
Normal file
@ -0,0 +1,13 @@
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
// Code generated by gen.go; DO NOT EDIT.
|
||||
|
||||
//go:build !ts_omit_routecheck
|
||||
|
||||
package buildfeatures
|
||||
|
||||
// HasRouteCheck is whether the binary was built with support for modular feature "Support checking the reachability of overlapping routers".
|
||||
// Specifically, it's whether the binary was NOT built with the "ts_omit_routecheck" build tag.
|
||||
// It's a const so it can be used for dead code elimination.
|
||||
const HasRouteCheck = true
|
||||
8
feature/condregister/maybe_routecheck.go
Normal file
8
feature/condregister/maybe_routecheck.go
Normal file
@ -0,0 +1,8 @@
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build !ts_omit_routecheck
|
||||
|
||||
package condregister
|
||||
|
||||
import _ "tailscale.com/feature/routecheck"
|
||||
@ -236,6 +236,10 @@ var Features = map[FeatureTag]FeatureMeta{
|
||||
Desc: "Linux systemd-resolved integration",
|
||||
Deps: []FeatureTag{"dbus"},
|
||||
},
|
||||
"routecheck": {
|
||||
Sym: "RouteCheck",
|
||||
Desc: "Support checking the reachability of overlapping routers",
|
||||
},
|
||||
"sdnotify": {
|
||||
Sym: "SDNotify",
|
||||
Desc: "systemd notification support",
|
||||
|
||||
11
feature/routecheck/routecheck.go
Normal file
11
feature/routecheck/routecheck.go
Normal file
@ -0,0 +1,11 @@
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build !ts_omit_routecheck
|
||||
|
||||
// Package routecheck registers support for RouteCheck,
|
||||
// which checks the reachability of overlapping routers.
|
||||
package routecheck
|
||||
|
||||
func init() {
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user