cmd/ctrld: fix a race in using logf

While at it, also fix the import and not use error.
This commit is contained in:
Cuong Manh Le
2023-06-23 23:12:44 +07:00
committed by Cuong Manh Le
parent de951fd895
commit eaa907a647

View File

@@ -8,7 +8,7 @@ import (
)
func init() {
if r, err := dns.NewOSConfigurator(logf, "lo"); err == nil {
if r, err := dns.NewOSConfigurator(func(format string, args ...any) {}, "lo"); err == nil {
useSystemdResolved = r.Mode() == "systemd-resolved"
}
}