diff --git a/common/netutils/dns.go b/common/netutils/dns.go index 621a094..a9b18d0 100644 --- a/common/netutils/dns.go +++ b/common/netutils/dns.go @@ -59,10 +59,6 @@ func tryUpdateSystemDnsElapse(k time.Duration) (err error) { func tryUpdateSystemDns() (err error) { dnsConf := dnsReadConfig("/etc/resolv.conf") - if len(dnsConf.servers) == 0 { - err = fmt.Errorf("no valid dns server in /etc/resolv.conf") - return err - } systemDns = netip.AddrPort{} for _, s := range dnsConf.servers { ipPort := netip.MustParseAddrPort(s) diff --git a/component/dns/dns.go b/component/dns/dns.go index 6a2951e..973b248 100644 --- a/component/dns/dns.go +++ b/component/dns/dns.go @@ -141,7 +141,10 @@ func (s *Dns) InitUpstreams() { for _, upstream := range s.upstream { wg.Add(1) go func(upstream *UpstreamResolver) { - upstream.GetUpstream() + _, err := upstream.GetUpstream() + if err != nil { + s.log.WithError(err).Debugln("Dns.GetUpstream") + } wg.Done() }(upstream) } diff --git a/control/control_plane.go b/control/control_plane.go index dddac44..5828060 100644 --- a/control/control_plane.go +++ b/control/control_plane.go @@ -213,7 +213,7 @@ func NewControlPlane( // Bind to WAN if len(global.WanInterface) > 0 { if err = core.setupSkPidMonitor(); err != nil { - return nil, err + log.WithError(err).Warnln("cgroup2 is not enabled; pname routing cannot be used") } for _, ifname := range global.WanInterface { if err = core.bindWan(ifname, global.AutoConfigKernelParameter); err != nil {