]> Cypherpunks repositories - gostls13.git/commit
net: use libresolv rules for ndots range and validation
authorDan Peterson <dpiddy@gmail.com>
Wed, 13 Jul 2016 16:35:35 +0000 (10:35 -0600)
committerMatthew Dempsky <mdempsky@google.com>
Wed, 17 Aug 2016 15:20:24 +0000 (15:20 +0000)
commit2f73fe7a0db269dcbe51e372809032fa52b8c68c
tree4e6e8026071d50cb9820e4574240885d7327e3e6
parent04e76f295f434bf1bd5ef3b01eed42b638a8b321
net: use libresolv rules for ndots range and validation

BIND libresolv allows values from 0 to 15.

For invalid values and negative numbers, 0 is used.
For numbers greater than 15, 15 is used.

Fixes #15419

Change-Id: I1009bc119c3e87919bcb55a80a35532e9fc3ba52
Reviewed-on: https://go-review.googlesource.com/24901
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/net/dnsconfig_unix.go
src/net/dnsconfig_unix_test.go
src/net/testdata/invalid-ndots-resolv.conf [new file with mode: 0644]
src/net/testdata/large-ndots-resolv.conf [new file with mode: 0644]
src/net/testdata/negative-ndots-resolv.conf [new file with mode: 0644]