Skip to content

Adding tcp_port and udp_port in ares_addr_node and process with that.#19

Closed
nuxlli wants to merge 1 commit into
c-ares:masterfrom
azukiapp:parse_port
Closed

Adding tcp_port and udp_port in ares_addr_node and process with that.#19
nuxlli wants to merge 1 commit into
c-ares:masterfrom
azukiapp:parse_port

Conversation

@nuxlli

@nuxlli nuxlli commented Aug 11, 2014

Copy link
Copy Markdown

This improvement allows you to specify different ports per server.

@pharaujo

Copy link
Copy Markdown

Can this be merged, please?

@bagder

bagder commented Jun 29, 2015

Copy link
Copy Markdown
Member

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.

@nuxlli

nuxlli commented Jul 21, 2015

Copy link
Copy Markdown
Author

@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

@bagder

bagder commented Jul 22, 2015

Copy link
Copy Markdown
Member

@bagder any suggestion on how I could write this in an ABI compatible way?

By introducing a new struct that is used by a new function instead of expanding/changing an existing one.

That's because the way it is, the lib doesn't work following your docs

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.

@petterreinholdtsen

Copy link
Copy Markdown

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.

@bagder

bagder commented Jan 17, 2016

Copy link
Copy Markdown
Member

@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

@daviddrysdale

Copy link
Copy Markdown
Member

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.

@daviddrysdale

Copy link
Copy Markdown
Member

Fixed in commit 7972adc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants