Keep confiured nameservers as fallback (#1036)

* keep existing nameserver as fallback when adding netbird resolver

* fix resolvconf

* fix imports
This commit is contained in:
pascal-fischer
2023-08-01 17:45:44 +02:00
committed by GitHub
parent 48098c994d
commit 890e09b787
4 changed files with 27 additions and 18 deletions

View File

@ -13,8 +13,6 @@ import (
"github.com/miekg/dns"
log "github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
nbdns "github.com/netbirdio/netbird/dns"
)
const (
@ -123,10 +121,6 @@ func (s *systemdDbusConfigurator) applyDNSConfig(config hostDNSConfig) error {
if err != nil {
return fmt.Errorf("setting link as default dns router, failed with error: %s", err)
}
domainsInput = append(domainsInput, systemdDbusLinkDomainsInput{
Domain: nbdns.RootZone,
MatchOnly: true,
})
s.routingAll = true
} else if s.routingAll {
log.Infof("removing %s:%d as main DNS forwarder for this peer", config.serverIP, config.serverPort)