mirror of
https://github.com/netbirdio/netbird.git
synced 2025-06-03 00:25:37 +02:00
[client] Disable DNS host manager for netstack mode (#3183)
This commit is contained in:
parent
516de93627
commit
b9efda3ce8
@ -12,6 +12,7 @@ import (
|
|||||||
"github.com/mitchellh/hashstructure/v2"
|
"github.com/mitchellh/hashstructure/v2"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
"github.com/netbirdio/netbird/client/iface/netstack"
|
||||||
"github.com/netbirdio/netbird/client/internal/listener"
|
"github.com/netbirdio/netbird/client/internal/listener"
|
||||||
"github.com/netbirdio/netbird/client/internal/peer"
|
"github.com/netbirdio/netbird/client/internal/peer"
|
||||||
"github.com/netbirdio/netbird/client/internal/statemanager"
|
"github.com/netbirdio/netbird/client/internal/statemanager"
|
||||||
@ -239,7 +240,10 @@ func (s *DefaultServer) Initialize() (err error) {
|
|||||||
|
|
||||||
s.stateManager.RegisterState(&ShutdownState{})
|
s.stateManager.RegisterState(&ShutdownState{})
|
||||||
|
|
||||||
if s.disableSys {
|
// use noop host manager if requested or running in netstack mode.
|
||||||
|
// Netstack mode currently doesn't have a way to receive DNS requests.
|
||||||
|
// TODO: Use listener on localhost in netstack mode when running as root.
|
||||||
|
if s.disableSys || netstack.IsEnabled() {
|
||||||
log.Info("system DNS is disabled, not setting up host manager")
|
log.Info("system DNS is disabled, not setting up host manager")
|
||||||
s.hostManager = &noopHostConfigurator{}
|
s.hostManager = &noopHostConfigurator{}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user