net/netcheck: fix netcheck cli-triggered nil pointer deref (#13782)

Updates #13780

Signed-off-by: Jordan Whited <jordan@tailscale.com>
This commit is contained in:
Jordan Whited 2024-10-10 15:52:47 -07:00 committed by GitHub
parent acb4a22dcc
commit 33029d4486
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -940,7 +940,7 @@ func (c *Client) GetReport(ctx context.Context, dm *tailcfg.DERPMap, opts *GetRe
}
}
if len(need) > 0 {
if !opts.OnlyTCP443 {
if opts == nil || !opts.OnlyTCP443 {
// Kick off ICMP in parallel to HTTPS checks; we don't
// reuse the same WaitGroup for those probes because we
// need to close the underlying Pinger after a timeout