parent
a8769e1df5
commit
0075911319
|
@ -57,7 +57,7 @@ func (hub *Hub) loadNameservers() error {
|
||||||
// if the user hasn't given any override of `ndots` AND has
|
// if the user hasn't given any override of `ndots` AND has
|
||||||
// given a custom nameserver. Set `ndots` to 1 as the fallback value
|
// given a custom nameserver. Set `ndots` to 1 as the fallback value
|
||||||
if hub.ResolverOpts.Ndots == -1 {
|
if hub.ResolverOpts.Ndots == -1 {
|
||||||
hub.ResolverOpts.Ndots = 1
|
hub.ResolverOpts.Ndots = 0
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,14 +10,6 @@ import (
|
||||||
// to configure a resolver from the query args.
|
// to configure a resolver from the query args.
|
||||||
func (hub *Hub) loadResolverOptions() {
|
func (hub *Hub) loadResolverOptions() {
|
||||||
hub.ResolverOpts.Timeout = hub.QueryFlags.Timeout
|
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
|
// loadResolvers loads differently configured
|
||||||
|
|
Loading…
Reference in New Issue