From f4d76fb46d9792964f269919bb00fbd82daec5d0 Mon Sep 17 00:00:00 2001 From: Jordan Whited Date: Mon, 14 Oct 2024 09:14:55 -0700 Subject: [PATCH] net/netcheck: fix netcheck cli-triggered nil pointer deref (#13782) (#13795) Updates #13780 Signed-off-by: Jordan Whited --- net/netcheck/netcheck.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netcheck/netcheck.go b/net/netcheck/netcheck.go index dbb85cf9c..bebf4c9b0 100644 --- a/net/netcheck/netcheck.go +++ b/net/netcheck/netcheck.go @@ -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