-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
gRPC-okhttp ipv6 link local scope #9325
Comments
The constructor was looked up (using reflection) as Could you create a PR after testing your change works? |
@sanjaypujare I checked locally and that was the issue, I was able to connect successfully after making your and mine suggestion. I'll open a PR soon. Thank you. |
PR open #9326 |
@sanjaypujare could you help me with the PR checks failing? I'm not familiar with them. |
Which checks are failing? |
I was able to solve, thank you. Waiting approval from the reviewer. |
Reverted in #9375 |
The reverted PR mentioned above says,
I see that the blaze build is successful in google3 with the fix that was reverted. Perhaps, the compilation issue was not gRPC's fault? 🧐 @ejona86 |
It wasn't gRPC's fault. But something using gRPC on Android had a build that couldn't depend on (IIRC) HostAndPort because of funny business they were doing with Guava or something. |
What version of gRPC-Java are you using?
1.45.0
What is your environment?
MacOS jdk 8
What did you expect to see?
I expect gRPC-okhttp be able to work with ipv6 link local with scope
What did you see instead?
AndroidNegotiator inside OkHttpProtocolNegotiator.java class is using
SNI_HOST_NAME.newInstance(hostname)
which throws exception because SNIHostName(String hostname) doesn't accept "%" and we need that for scoping ipv6 link local.Suggestion would be using SNIHostName(byte[] encoded). To do so we would need to replace line 252 to
SNI_HOST_NAME.newInstance(hostname.getBytes())
Steps to reproduce the bug
Any connection that uses
configureTlsExtensions
from AndroidNegotiator class which uses ipv6 link local with scoping like "%wlan0"The text was updated successfully, but these errors were encountered: