summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/miekg/dns/clientconfig.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/miekg/dns/clientconfig.go')
-rw-r--r--vendor/github.com/miekg/dns/clientconfig.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/vendor/github.com/miekg/dns/clientconfig.go b/vendor/github.com/miekg/dns/clientconfig.go
index 6479fef93..a606ef696 100644
--- a/vendor/github.com/miekg/dns/clientconfig.go
+++ b/vendor/github.com/miekg/dns/clientconfig.go
@@ -79,8 +79,10 @@ func ClientConfigFromReader(resolvconf io.Reader) (*ClientConfig, error) {
switch {
case len(s) >= 6 && s[:6] == "ndots:":
n, _ := strconv.Atoi(s[6:])
- if n < 1 {
- n = 1
+ if n < 0 {
+ n = 0
+ } else if n > 15 {
+ n = 15
}
c.Ndots = n
case len(s) >= 8 && s[:8] == "timeout:":