-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give a valid service address in SRV lookup when it differs from the node's #2446
Conversation
@@ -357,6 +358,46 @@ PARSE: | |||
query := strings.Join(labels[:n-1], ".") | |||
d.preparedQueryLookup(network, datacenter, query, req, resp) | |||
|
|||
case "addr": | |||
if n < 2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be != 2
so we don't accept any periods, since we know it's just hex stuff.
LGTM - one tiny thing and then the IPv6 test and this should be gtg! |
if !ok { | ||
t.Fatalf("Bad: %#v", in.Extra[0]) | ||
} | ||
if aRec.Hdr.Name != "2607002040050808000000000000200e.addr.dc1.consul." { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol these hex names are 1337
Addressed the comment and added a couple tests for lookups on 'addr.consul' |
Fixes #832
Still need to add a 'TestDNS_ServiceLookup_ServiceAddressIPv6' test, I think that's the only thing missing here.