-
Notifications
You must be signed in to change notification settings - Fork 1.5k
ipv6 getaddrinfo error #3286
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
So... this works OK without the square brackets? |
yes |
When the lws_client_connect_via_info interface is invoked, the addr field of lws_client_connect_info does not contain square brackets. As a result, the HTTP part fails. |
It sounds like some code is needed to strip the square brackets if present before using it with things that don't know about it. |
Yes, the square brackets are used to isolate IPv6 addresses and ports, but some interfaces cannot recognize the square brackets and need to be removed separately. |
Can this problem be handled in later versions? |
It seems the basic point is that this square bracket syntax only exists to disambiguate urls (literally, urls) which already have another meaning for As such, if I understand it, it's not an "ipv6 thing" that should make it into the ipv6 layer, it's a 'url thing' and it should be stripped when parsing the host IP or name from the url representation; the parsed host part should have been delimited by any
libwebsockets/lib/core-net/wsi.c Line 685 in 4c50636
So AFAICS there's nothing to do in lws about this? |
What is the network address of the parameter transferred by the lws_client_connect_via_info interface? |
Well, it's quite possible, since I mostly wrote the whole thing over 15 years alone, unpaid. But in this case, I think you don't understand the problem yet. Are you using lws_parse_url()? As I wrote above your comment, [] is not an ipv6 thing, it is a URL thing. The api for dealing with it in lws lives in the URL handling api. |
error log: "lws_getaddrinfo46: getaddrinfo 'ipv6 address' says 7"
error log: lws_client_connect_3_connect: dns lookup failed 7
In the lws_client_connect_2_dnsreq interface, an error is reported when the getaddrinfo command is executed for the IPv6 address in square brackets. As a result, the link cannot be set up.
Android machine
The text was updated successfully, but these errors were encountered: