ipn: make ServeConfig.IsFunnelOn false in ts_omit_serve builds

Funnel can't be on without serve. With the HasServe check, the
compiler reduces the method to a constant and inlines it, so the
linker drops it from those builds.

Updates #22283

Change-Id: Idd5da9c1e4f8f41a828a3774f5c4d44872eb1dda
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick authored and Brad Fitzpatrick committed 2026-11-10 07:24:48 -08:00
1 parent b9d5ff3ae7
commit 444baf1ef5
1 file changed
+2 -1
+2 -1
View File
@@ -15,6 +15,7 @@ import (
"strconv"
"strings"
"tailscale.com/feature/buildfeatures"
"tailscale.com/ipn/ipnstate"
"tailscale.com/tailcfg"
"tailscale.com/tailcfg/nodecap"
@@ -620,7 +621,7 @@ func (v ServeConfigView) IsFunnelOn() bool { return v.ж.IsFunnelOn() }
// IsFunnelOn reports whether any funnel endpoint is currently enabled for this node.
func (sc *ServeConfig) IsFunnelOn() bool {
if sc == nil {
if !buildfeatures.HasServe || sc == nil {
return false
}
for _, b := range sc.AllowFunnel {