Skip to content

Commit 2408a4b

Browse files
committed
net: allow _ in names
Enables lookup of _jabber._tcp.gmail.com's SRV record. Fixes #1167. R=r, r2 CC=golang-dev https://golang.org/cl/2353043
1 parent 7eb13b9 commit 2408a4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pkg/net/dnsclient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func isDomainName(s string) bool {
207207
switch {
208208
default:
209209
return false
210-
case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z':
210+
case 'a' <= c && c <= 'z' || 'A' <= c && c <= 'Z' || c == '_':
211211
ok = true
212212
case '0' <= c && c <= '9':
213213
// fine

0 commit comments

Comments
 (0)