diff --git a/cmd/doggo/nameservers.go b/cmd/doggo/nameservers.go index 9ef279f..e5a8437 100644 --- a/cmd/doggo/nameservers.go +++ b/cmd/doggo/nameservers.go @@ -57,7 +57,7 @@ func (hub *Hub) loadNameservers() error { // if the user hasn't given any override of `ndots` AND has // given a custom nameserver. Set `ndots` to 1 as the fallback value if hub.ResolverOpts.Ndots == -1 { - hub.ResolverOpts.Ndots = 1 + hub.ResolverOpts.Ndots = 0 } return nil } diff --git a/cmd/doggo/resolver.go b/cmd/doggo/resolver.go index 9622435..7e65cf6 100644 --- a/cmd/doggo/resolver.go +++ b/cmd/doggo/resolver.go @@ -10,14 +10,6 @@ import ( // to configure a resolver from the query args. func (hub *Hub) loadResolverOptions() { hub.ResolverOpts.Timeout = hub.QueryFlags.Timeout - // in case `ndots` is not set by `/etc/resolv.conf` while parsing - // the config for a system default namseserver. - if hub.ResolverOpts.Ndots == 0 { - // in case the user has not specified any `ndots` arg. - if hub.QueryFlags.Ndots == 0 { - hub.ResolverOpts.Ndots = 1 - } - } } // loadResolvers loads differently configured