misleading error message when using ADNS without internet connection #1062
Labels
Component: mosquitto-broker
Status: Completed
Nothing further to be done with this issue, it can be closed by the requestor or committer.
Type: Bug
Milestone
When the broker tries to connect to a bridge when there is no internet, then error message is:
"Error creating bridge: Protocol not supported."
instead of
"Network unreachable"
I added some debug code:
This means, that when there is no internet, adns gives back 3 addrinfo: 6 == TCP, 17 == UDP and 0 which is invalid.
I think the best solution would be to give SOCK_STREAM to getaddrinfo_a.
We do not want UDP connections at all.
And with the hint, it does not give back protocol 0.
In lib/net_mosq.c:net__try_connect_step1
The reason this is not a pull request, is that i am not sure that stack allocated addrinfo is a good solution. It may need to be heap allocated.
The text was updated successfully, but these errors were encountered: