diff options
Diffstat (limited to 'net/dns')
| -rw-r--r-- | net/dns/manager.go | 6 | ||||
| -rw-r--r-- | net/dns/resolver/forwarder.go | 1 | ||||
| -rw-r--r-- | net/dns/resolver/tsdns.go | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/net/dns/manager.go b/net/dns/manager.go index de99fe646..5170d0b78 100644 --- a/net/dns/manager.go +++ b/net/dns/manager.go @@ -15,7 +15,6 @@ import ( "runtime" "slices" "strings" - "sync" "sync/atomic" "time" @@ -65,8 +64,8 @@ type Manager struct { knobs *controlknobs.Knobs // or nil goos string // if empty, gets set to runtime.GOOS - mu sync.Mutex // guards following - config *Config // Tracks the last viable DNS configuration set by Set. nil on failures other than compilation failures or if set has never been called. + mu syncs.Mutex // guards following + config *Config // Tracks the last viable DNS configuration set by Set. nil on failures other than compilation failures or if set has never been called. } // NewManagers created a new manager from the given config. @@ -95,6 +94,7 @@ func NewManager(logf logger.Logf, oscfg OSConfigurator, health *health.Tracker, knobs: knobs, goos: goos, } + syncs.RegisterMutex(&m.mu, "dns.Manager.mu") m.ctx, m.ctxCancel = context.WithCancel(context.Background()) m.logf("using %T", m.os) diff --git a/net/dns/resolver/forwarder.go b/net/dns/resolver/forwarder.go index 5adc43efc..83b28fdb4 100644 --- a/net/dns/resolver/forwarder.go +++ b/net/dns/resolver/forwarder.go @@ -267,6 +267,7 @@ func newForwarder(logf logger.Logf, netMon *netmon.Monitor, linkSel ForwardLinkS controlKnobs: knobs, verboseFwd: verboseDNSForward(), } + syncs.RegisterMutex(&f.mu, "resolver.forwarder.mu") f.ctx, f.ctxCancel = context.WithCancel(context.Background()) return f } diff --git a/net/dns/resolver/tsdns.go b/net/dns/resolver/tsdns.go index 3185cbe2b..25916c6c9 100644 --- a/net/dns/resolver/tsdns.go +++ b/net/dns/resolver/tsdns.go @@ -249,6 +249,7 @@ func New(logf logger.Logf, linkSel ForwardLinkSelector, dialer *tsdial.Dialer, h dialer: dialer, health: health, } + syncs.RegisterMutex(&r.mu, "resolver.Resolver.mu") r.forwarder = newForwarder(r.logf, netMon, linkSel, dialer, health, knobs) return r } |
