Adding tcp_port and udp_port in ares_addr_node and process with that.#19
Adding tcp_port and udp_port in ares_addr_node and process with that.#19nuxlli wants to merge 1 commit into
Conversation
|
Can this be merged, please? |
|
This change isn't done in an ABI compatible way. Older applications will use a smaller struct so we cannot just unconditionally write to the new members of the struct. |
|
@bagder any suggestion on how I could write this in an ABI compatible way? That's because the way it is, the lib doesn't work following your docs 😕 Just as reference, I'm using this change on this lib: https://github.com/azukiapp/libnss-resolver |
By introducing a new struct that is used by a new function instead of expanding/changing an existing one.
The lib does work for quite a lot of users so I guess you're talking about some specifics? If there are bugs in the docs we should work on fixing those too. |
|
One function talking about ports is ares_set_servers_csv(), which claim that port is ignored. But as far as my testing goes, setting the port causes it to become 1, not 53. I would like to be able to use c-ares with Tor listening for DNS requests on a port other than 53, and this do not work currently. |
|
@petterreinholdtsen that sounds like a bug in ares_set_servers_csv() though, which indeed is related to this issue but still will need a separate fix as well |
|
By the way, I've got a pending change that should help with this (it adds a new structure and entrypoints for setting per-server ports) -- I'll send it round soon. |
|
Fixed in commit 7972adc |
This improvement allows you to specify different ports per server.