all: consistently initialize Logf when creating tsdial.Dialers

Most visible when using tsnet.Server, but could have resulted in dropped
messages in a few other places too.

Fixes #5743

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
Mihai Parparita
2022-09-30 14:15:17 -07:00
committed by Mihai Parparita
parent a7efc7bd17
commit 8343b243e7
7 changed files with 7 additions and 8 deletions

View File

@@ -271,7 +271,7 @@ func (s *Server) start() (reterr error) {
}
closePool.add(s.linkMon)
s.dialer = new(tsdial.Dialer) // mutated below (before used)
s.dialer = &tsdial.Dialer{Logf: logf} // mutated below (before used)
eng, err := wgengine.NewUserspaceEngine(logf, wgengine.Config{
ListenPort: 0,
LinkMonitor: s.linkMon,