From 444baf1ef522e3aa635c3fcb8a036a1d75eda021 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 9 Nov 2026 23:36:09 +0000 Subject: [PATCH] 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 --- ipn/serve.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipn/serve.go b/ipn/serve.go index e62615780..05659789f 100644 --- a/ipn/serve.go +++ b/ipn/serve.go @@ -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 {