-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[posix] update Posix::Resolver to support IPv6 addresses for servers. #11325
Conversation
34c1ae2
to
c217e04
Compare
a5e9eed
to
70c3cbc
Compare
Size Report of OpenThread
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11325 +/- ##
==========================================
+ Coverage 73.22% 76.35% +3.12%
==========================================
Files 628 630 +2
Lines 97928 98717 +789
==========================================
+ Hits 71711 75378 +3667
+ Misses 26217 23339 -2878
🚀 New features to boost your workflow:
|
70c3cbc
to
9879d29
Compare
Thanks @yangsong-cnyn for adding this. One suggestion about the title of the PR and commit message. You have used [dns] dns solver to support ipv6 address.
I would suggest changing the title to [posix] update |
… code revise
969a845
to
5a38e54
Compare
fd9cb6b
to
0ad7128
Compare
… code revise
0ad7128
to
a9e8001
Compare
… code revise
… add comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @yangsong-cnyn for the changed. Looks good overall.
Couple of smaller suggestions below:
888161f
to
cccd8f7
Compare
5465bea
to
db0f060
Compare
250e72a
to
cb2c465
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for all the changes.
Couple of smaller suggestions belwo:
@@ -228,7 +276,7 @@ Resolver::Transaction *Resolver::GetTransaction(int aFd) | |||
|
|||
for (Transaction &txn : mUpstreamTransaction) | |||
{ | |||
if (txn.mThreadTxn != nullptr && txn.mUdpFd == aFd) | |||
if (txn.mThreadTxn != nullptr && (txn.mUdpFd4 == aFd || txn.mUdpFd6 == aFd)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Resolver::GetTransaction(int aFd)
does not seem to be used at all. I'm not sure why it was added.
Perhaps in a future (separate) PR, we can remove this to make the code simpler/cleaner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will remove it in next PR
… revise
cf26ed9
to
110bec2
Compare
This PR enhances the DNS resolver (
resolver.cpp
) to support IPv6 addresses in upstream DNS server configurations, allowing for greater flexibility and compatibility in IPv6-enabled environments.Key Changes:
LoadDnsServerListFromConf
:LoadDnsServerListFromConf
function now parses both IPv4 and IPv6 addresses from/etc/resolv.conf
usinginet_pton
withAF_INET
andAF_INET6
.mUpstreamDnsServerList
.Query
: