-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
IpV6 link local addresses resolve but don't connect #1464
Comments
rdaum
pushed a commit
to rdaum/paho.mqtt.c
that referenced
this issue
Apr 10, 2024
Paho currently successfully resolves IPv6 link-local addresses (of the form `tcp://[xxxx::xxxx:xxxx:xxxx%eth0]:1883`). But it does not copy the resolved link information over when attempting to make the connection. This is a 3-line fix. See: eclipse-paho#1464
Fix at master...rdaum:paho.mqtt.c:master I'd create a PR, but I'm not going to go register and sign the Eclipse contributors agreement just for this. Please apply it yourselves. |
jumoog
pushed a commit
to jumoog/paho.mqtt.c
that referenced
this issue
Apr 10, 2024
Paho currently successfully resolves IPv6 link-local addresses (of the form `tcp://[xxxx::xxxx:xxxx:xxxx%eth0]:1883`). But it does not copy the resolved link information over when attempting to make the connection. This is a 3-line fix. See: eclipse-paho#1464
jumoog
added a commit
to jumoog/paho.mqtt.c
that referenced
this issue
Apr 10, 2024
Paho currently successfully resolves IPv6 link-local addresses (of the form `tcp://[xxxx::xxxx:xxxx:xxxx%eth0]:1883`). But it does not copy the resolved link information over when attempting to make the connection. This is a 3-line fix. See: eclipse-paho#1464
I made a PR.. #1466 I had to reset the author to pass eca check. I hope thats fine for everybody. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
ipv6 link local style addresses don't work.
paho.mqtt.c successfully resolves addresses of the form
tcp://[xxxx::xxxx:xxxx:xxxx%eth0]:1883
But when it comes to connect, the complete results from
getaddrinfo
are not copied over into theaddrinfo
, as per line 1130 ofSocket.c
:This only copies over the address, but not the
sin6_scope_id
andsin6_flowinfo
, so the complete link local address cannot connect.Adding these two lines (or cleaner variant thereof) led to success for me:
To Reproduce
Attempt to connect to an ipv6 link local address to a mqtt broker. It will fail at connect time. Adding the two lines listed above makes it succeed.
Expected behavior
Paho should be able to connect to a broker using such an address.
** Environment (please complete the following information):**
The text was updated successfully, but these errors were encountered: