-
Notifications
You must be signed in to change notification settings - Fork 4.5k
dns: scoped literal IPv6 addresses should be supported #3272
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
Comments
Literal IPv6 addresses with zone identifer are supported by functions like A work-around now is to use To solve this in the DNS resolver, we can remove the special code for IPs (so we don't call |
use |
The issue is interesting, I'm willing to take this task up. |
@menghanl After I read code and your instruction, I think the solution is to remove grpc-go/internal/resolver/dns/dns_resolver.go Line 364 in a42567f
grpc-go/internal/resolver/dns/dns_resolver.go Line 387 in a42567f
|
It's not enough to remove parseIPv6 support literal IPv6 |
OMG,the solution above is wrong. |
I don't remember all the details about this issue. Seems it's as easy as finding the If the DNS resolver can recognize this address, it can just return it as is, and Note that in ParseIP (and when used with gRPC), the address should be put in brackets |
Yes, I notice that |
Is there any solution for grpc.Dial to connect to ipv6 with scope? Maybe example? Now with |
Works for me:
|
Given that the |
@purnesh42H assign to me |
@purnesh42H this works for ipv6 with below format |
We did this as part of some other effort. So, these tests are reasonably OK.
That's good to know. We need to have a unit test for this. |
Thanks @hanut19. Could you write a unit test for the |
@purnesh42H please review hanut19#1 |
@hanut19 : Is there a reason to send a pull request on your fork instead of on master? |
purnesh told as to do in this way. |
@purnesh42H @easwars we should try to fix it in our parsing logic. |
Based on #3272 (comment), the |
@hanut19 please test |
@purnesh42H net.ParseIP unable to parse this [fe80::1ff:fe23:4567:890a%eth2] with % escaped. address := "[fe80::1ff:fe23:4567:890a%eth2]" Escaped using the following methods:
|
fe80::1ff:fe23:4567:890a%eth2
is a valid IPv6 address, and should be supported in the DNS resolverIt fails with
ParseIP
error now.https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses
The text was updated successfully, but these errors were encountered: