mirror of
https://github.com/espressif/openthread.git
synced 2026-08-12 05:37:46 +00:00
[dns] signal an error immediately when no upstream DNS server available (#11480)
Currently, if the platform has no upstream DNS server configured, upstream DNS query will eventually time out. This can lead to delays in responding to the DNS client. The new otPlatDnsIsUpstreamQueryAvailable API provides a mechanism for the platform to proactively signal the unavailability of upstream DNS.
This commit is contained in:
@@ -700,6 +700,13 @@ otError otPlatUdpLeaveMulticastGroup(otUdpSocket *aUdpSocket,
|
||||
#endif // OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE
|
||||
|
||||
#if OPENTHREAD_CONFIG_DNS_UPSTREAM_QUERY_ENABLE
|
||||
bool otPlatDnsIsUpstreamQueryAvailable(otInstance *aInstance)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void otPlatDnsStartUpstreamQuery(otInstance *aInstance, otPlatDnsUpstreamQuery *aTxn, const otMessage *aQuery)
|
||||
{
|
||||
OT_UNUSED_VARIABLE(aInstance);
|
||||
|
||||
Reference in New Issue
Block a user