|
|
|
SRV support and RFC compliance
LookupSRV() always fails because isDomainName() returns false for any
valid SRV query. Specifically, it rejects the leading _ character on
the first two domain name parts. This patch changes the behavior of
isDomainName() to be in keeping with RFC 2181, which allows SRV
queries to work. However, that RFC appears to contradict the other
cited RFCs. It's likely that a correct reading requires a delicate
interpretation of "DNS record" vs. "DNS name" or something similar.
This change also adds LookupSRVByNet(), which uses the three
parameters listed in RFC 2782: service, proto, and name. This
function could use a better name; I'm guessing we can't replace the
old LookupSRV() with it, because it would be an incompatible API
change.
Patch Set 1 #Patch Set 2 : code review 2420041: SRV support and RFC compliance #Patch Set 3 : code review 2420041: SRV support and RFC compliance #
Total messages: 10
|
cjyar
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change.
|
15 years, 3 months ago (2010年10月10日 06:41:10 UTC) #1 | ||||||||||||||||||||||||||||||||
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change.
Please sync with the latest tip. I believe half of this CL is covered by changeset: 6473:9b27e48edf12 user: Russ Cox <rsc@golang.org> date: Thu Oct 07 06:45:50 2010 -0400 summary: net: allow _ in names I'd be happy to replace LookupSRV instead of adding a new function. Thanks. Russ
Hello golang-dev@googlegroups.com, rsc (cc: golang-dev@googlegroups.com), Please take another look.
Hello golang-dev@googlegroups.com, rsc (cc: golang-dev@googlegroups.com), Please take another look.
On 2010年10月15日 04:44:24, cjyar wrote: > Hello mailto:golang-dev@googlegroups.com, rsc (cc: mailto:golang-dev@googlegroups.com), > > Please take another look. Replaced the old LookupSRV() with the new 3-argument syntax. I think this is more in keeping with the relevant RFC. I also changed dnsname_test.go a bit. There are some names that I really don't know if we should accept or not, so I removed them as test cases. :) I added a bit of logic to isDomainName() to check the overall length of the name and the lengths of its parts.
It's been a couple of weeks. Could somebody take a look at this? Chris On 10/14/2010 10:46 PM, chris.jones.yar@gmail.com wrote: > On 2010年10月15日 04:44:24, cjyar wrote: >> Hello mailto:golang-dev@googlegroups.com, rsc (cc: > mailto:golang-dev@googlegroups.com), > >> Please take another look. > > Replaced the old LookupSRV() with the new 3-argument syntax. I think > this is more in keeping with the relevant RFC. > > I also changed dnsname_test.go a bit. There are some names that I really > don't know if we should accept or not, so I removed them as test cases. > :) > > I added a bit of logic to isDomainName() to check the overall length of > the name and the lengths of its parts. > > http://codereview.appspot.com/2420041/
LGTM
Could you please complete a CLA as described at http://golang.org/doc/contribute.html#copyright ? Thanks. Russ
Done. On 11/1/2010 2:21 PM, rsc@google.com wrote: > Could you please complete a CLA as described at > http://golang.org/doc/contribute.html#copyright ? > > Thanks. > Russ > > > http://codereview.appspot.com/2420041/
*** Submitted as e4191df7dd41 *** net: fix LookupSRV R=rsc, chris CC=golang-dev http://codereview.appspot.com/2420041 Committer: Russ Cox <rsc@golang.org>