Repository navigation
Conversation
shoemoney
force-pushed
the
fix/funnel-no-cert-domains
branch
from
November 28, 2026 04:25
b839b4d to
49b362f
Compare
tailscale_enable_funnel_to_localhost_plaintext_http1 indexed st.CertDomains[0] without checking the slice. On a tailnet without HTTPS enabled, CertDomains is empty and the call panicked inside cgo, aborting the host process. Return an error with a message instead. It also discarded the error from SetServeConfig and then checked sc.AllowFunnel, a map the function had just filled itself, so the failure branch could never run. Return the SetServeConfig error. Fixes tailscale/tailscale#22713 Change-Id: Icbf789ac5c03cec8b35f115a5cc6e97dd28c9e91 Signed-off-by: Jeremy Schoemaker <jeremy@shoemoney.com>
shoemoney
force-pushed
the
fix/funnel-no-cert-domains
branch
from
November 28, 2026 18:41
49b362f to
e0fe650
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tailscale_enable_funnel_to_localhost_plaintext_http1indexesst.CertDomains[0]without a length check. On a tailnet that hasn't enabled HTTPS certificates the slice is empty, so the call panics inside cgo and takes the embedding process down with it. It now returns -1 and setstailscale_errmsg.While I was in there: the function threw away the error from
SetServeConfigand then checkedsc.AllowFunnel[hp], a map it had just filled in itself. That branch could never run, so a failed set returned 0. It now returns theSetServeConfigerror.The test brings a node up against testcontrol, which hands out no cert domains, and calls the function. On main:
I couldn't find a way to make
SetServeConfigfail under testcontrol, so that path is untested.Fixes tailscale/tailscale#22713