netcheck: ignore IPv4 STUN failures if we saw at least one reply
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
ed7e088729
commit
0d3f42e1d8
|
@ -296,7 +296,20 @@ func (c *Client) GetReport(ctx context.Context) (*Report, error) {
|
||||||
DNSCache: dnscache.Get(),
|
DNSCache: dnscache.Get(),
|
||||||
}
|
}
|
||||||
c.s4 = s4
|
c.s4 = s4
|
||||||
grp.Go(func() error { return s4.Run(ctx) })
|
grp.Go(func() error {
|
||||||
|
err := s4.Run(ctx)
|
||||||
|
if err == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
mu.Lock()
|
||||||
|
defer mu.Unlock()
|
||||||
|
// If we got at least one IPv4 endpoint, treat that as
|
||||||
|
// good enough.
|
||||||
|
if gotEP4 != "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
})
|
||||||
if c.GetSTUNConn4 == nil {
|
if c.GetSTUNConn4 == nil {
|
||||||
go reader(s4, pc4)
|
go reader(s4, pc4)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue