Skip to content

Conversation

@bradh352
Copy link
Member

@bradh352 bradh352 commented Mar 22, 2024

c-ares has historically passed around raw dns packets in binary form. Now that we have a new parser, and messages are already parsed internally, lets pass around that parsed message rather than requiring multiple parse attempts on the same message. Also add a new ares_send_dnsrec() and ares_query_dnsrec() similar to ares_search_dnsrec() added with PR #719 that can return the pointer to the ares_dns_record_t to the caller enqueuing queries and rework ares_search_dnsrec() to use ares_send_dnsrec() internally.

@bradh352 bradh352 marked this pull request as draft March 22, 2024 23:14
@bradh352
Copy link
Member Author

@oliverwelsh don't know if you want to review any progress, but I'm working on implementing what was discussed as the next step in #719

@bradh352 bradh352 marked this pull request as ready for review March 23, 2024 18:07
@bradh352
Copy link
Member Author

Other than missing manpages, I think the code for this is done...

Copy link
Contributor

@oliverwelsh oliverwelsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Brad, thank you for following up on this. It's great to see the DNS record object and parser used throughout the codebase as standard!

I have taken a look through of the code and left a couple of review comments. Overall I think this looks great. I especially like ares__search_name_list() - it feels a lot cleaner to calculate the search domains up front, which simplifies the logic when doing multiple searches.

@bradh352 bradh352 merged commit e862d1f into c-ares:main Mar 25, 2024
@bradh352 bradh352 deleted the ares_send_dnsrec branch March 26, 2024 16:05
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.

2 participants