Improve socket function replacement subsystem#894
Merged
bradh352 merged 18 commits intoc-ares:mainfrom Oct 8, 2024
Merged
Conversation
Member
Author
|
still need to update manpages, and work with seastar to ensure there is nothing else that needs to be extended |
Contributor
thank you Brad! please ping me once this PR is ready for test. i will build seastar with your change and test it. |
Member
Author
|
@tchaikov Other than updating the manpages, I think the code itself is done. I added if_nametoindex() and if_indextoname() as external network functions that can be specified in the new api. That said, even without changing anything in your existing integration, it should fix the regression from 1.33.0. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some external users swap out the entire IP stack, such as Seastar that uses DPDK. So we need to allow them to override all network stack functions used by c-ares. Since we don't know what network functions may be needed in the future, we need to make a versioned structure that can be expanded. We'll need to disable any features in the future if the versioned interface is less than is required to support any new features.
We recently had a regression when we added DNS Cookie support as we relied on
getsockname()to get the local source ip address, but we were calling the native version since there was no registered callback available. We will mark this as optional and just skip this step in DNS Cookie invalidation if its not available for the legacy api users.Supersedes #893
Authored-By: Brad House (@bradh352)