From 88097b836a1b0631d448dbfba1f55cea05640ab7 Mon Sep 17 00:00:00 2001 From: valscale Date: Tue, 20 Jun 2023 12:04:55 -0700 Subject: [PATCH] prober: allow monitoring of nodes marked as STUN only in default derpmap (#8391) 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),