Replies: 1 comment 2 replies
-
|
@Cristib05, thanks for reporting this. I am not the original author of the "upstream DNS code" and am not super familiar with it. To understand this, I read the code to see how it works and also tracked the git history to see what was added/changed and when. This whole feature was added in this PR: And the same inconsistent documentation statements are present in this original PR. So it was unfortunately there since the beginning! From reading the code, it looks like the implementation does require that the Here are the details:
Also, as you pointed out, the simulation platform implementation does call the openthread/src/posix/platform/resolver.cpp Lines 315 to 327 in 47f0417 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
In https://github.com/openthread/openthread/blob/main/include/openthread/platform/dns.h, I can see that for
otPlatDnsStartUpstreamQuerydocumentation, the following is stated:The OpenThread core may cancel a (possibly timeout) query transaction by calling
otPlatDnsCancelUpstreamQuery, the platform must not callotPlatDnsUpstreamQueryDoneon a cancelled transaction. https://github.com/openthread/openthread/blob/main/include/openthread/platform/dns.h#L83But for
otPlatDnsCancelUpstreamQuerydocumentation, it is stated:The platform must call
otPlatDnsUpstreamQueryDoneto release the resources.Also, in simultion code, it seems that the call to
otPlatDnsUpstreamQueryDoneis performed: https://github.com/openthread/openthread/blob/main/examples/platforms/simulation/dns.c#L49I would like to understand if there is a documentation error for
otPlatDnsStartUpstreamQuerydocumentation and if the platform is expected to callotPlatDnsUpstreamQueryDonewhenotPlatDnsCancelUpstreamQueryis called.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions