revert systemd changes (#1046)

This commit is contained in:
pascal-fischer 2023-08-03 00:05:13 +02:00 committed by GitHub
parent 74fde0ea2c
commit 24e19ae287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,6 +13,8 @@ import (
"github.com/miekg/dns"
log "github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
nbdns "github.com/netbirdio/netbird/dns"
)
const (
@ -121,6 +123,10 @@ 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)