diff options
| author | Brad Fitzpatrick <bradfitz@tailscale.com> | 2020-07-27 10:10:10 -0700 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@tailscale.com> | 2020-07-27 10:10:10 -0700 |
| commit | 69f3ceeb7ccacdc1dfb6293869093b8d6d9669e2 (patch) | |
| tree | ab32e26ab9780ed739263fe9900c77d6d0e63e84 | |
| parent | 990e2f1ae9f5401ef82b5ad43c79497cc5813c5a (diff) | |
| download | tailscale-69f3ceeb7ccacdc1dfb6293869093b8d6d9669e2.tar.xz tailscale-69f3ceeb7ccacdc1dfb6293869093b8d6d9669e2.zip | |
derp/derphttp: don't return all nil from dialRegion when STUNOnly nodes
| -rw-r--r-- | derp/derphttp/derphttp_client.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/derp/derphttp/derphttp_client.go b/derp/derphttp/derphttp_client.go index 946c8c937..83697c257 100644 --- a/derp/derphttp/derphttp_client.go +++ b/derp/derphttp/derphttp_client.go @@ -338,6 +338,9 @@ func (c *Client) dialRegion(ctx context.Context, reg *tailcfg.DERPRegion) (net.C var firstErr error for _, n := range reg.Nodes { if n.STUNOnly { + if firstErr == nil { + firstErr = fmt.Errorf("no non-STUNOnly nodes for %s", c.targetString(reg)) + } continue } c, err := c.dialNode(ctx, n) |
