]> Cypherpunks repositories - gostls13.git/commitdiff
net: allow _ in names
authorRuss Cox <rsc@golang.org>
Thu, 7 Oct 2010 10:45:50 +0000 (06:45 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 7 Oct 2010 10:45:50 +0000 (06:45 -0400)
Enables lookup of _jabber._tcp.gmail.com's SRV record.

Fixes #1167.

R=r, r2
CC=golang-dev
https://golang.org/cl/2353043

src/pkg/net/dnsclient.go

index 0343dd2f0abe234cf5fd53443784e36d6d3f85f5..16103c4d05b6e874bb7d095d3959e4ce48b71bbe 100644 (file)
@@ -207,7 +207,7 @@ func isDomainName(s string) bool {
                switch {
                default:
                        return false
-               case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z':
+               case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || c == '_':
                        ok = true
                case '0' <= c && c <= '9':
                        // fine