net: drop redundant domain name length check

It is already validated by isDoaminName.

Change-Id: I7a955b632a5143e16b012641cf12bad452900753
Reviewed-on: https://go-review.googlesource.com/13789
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Mikio Hara 2015-08-22 11:03:11 +09:00
parent 8ca785621e
commit c049d34006

View file

@ -165,9 +165,6 @@ func tryOneName(cfg *dnsConfig, name string, qtype uint16) (string, []dnsRR, err
if len(cfg.servers) == 0 {
return "", nil, &DNSError{Err: "no DNS servers", Name: name}
}
if len(name) >= 256 {
return "", nil, &DNSError{Err: "DNS name too long", Name: name}
}
timeout := time.Duration(cfg.timeout) * time.Second
var lastErr error
for i := 0; i < cfg.attempts; i++ {