Skip to content

Commit

Permalink
[client] Disable DNS host manager for netstack mode (#3183)
Browse files Browse the repository at this point in the history
  • Loading branch information
lixmal authored Jan 15, 2025
1 parent 516de93 commit b9efda3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/internal/dns/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"github.com/mitchellh/hashstructure/v2"
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/peer"
"github.com/netbirdio/netbird/client/internal/statemanager"
Expand Down Expand Up @@ -239,7 +240,10 @@ func (s *DefaultServer) Initialize() (err error) {

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")
s.hostManager = &noopHostConfigurator{}
return nil
Expand Down

0 comments on commit b9efda3

Please sign in to comment.