From 61fcfec0d11b052a2b1ee51b1fb6a5b0b22ef6de Mon Sep 17 00:00:00 2001 From: Val Date: Tue, 20 Jun 2023 19:49:43 +0200 Subject: [PATCH] prober: allow monitoring of nodes marked as STUN only in default derpmap prober uses NewRegionClient() to connect to a derper using a faked up single-node region, but NewRegionClient() fails to connect if there is no non-STUN only client in the region. Set the STUN only flag to false before we call NewRegionClient() so we can monitor nodes marked as STUN only in the default derpmap. Updates #11492 Signed-off-by: Val --- prober/derp.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prober/derp.go b/prober/derp.go index cd267e27e..3cd944636 100644 --- a/prober/derp.go +++ b/prober/derp.go @@ -348,6 +348,8 @@ func newConn(ctx context.Context, dm *tailcfg.DERPMap, n *tailcfg.DERPNode) (*de priv := key.NewNode() dc := derphttp.NewRegionClient(priv, l, nil /* no netMon */, func() *tailcfg.DERPRegion { rid := n.RegionID + // Allow the prober to monitor nodes marked as STUN only in the default map + n.STUNOnly = false return &tailcfg.DERPRegion{ RegionID: rid, RegionCode: fmt.Sprintf("%s-%s", dm.Regions[rid].RegionCode, n.Name),