You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lines 58 and 64 have been added to use switching_lock Mutex.
Whenever the application tries to resolve DNS using, for instance WiFi, and OpenThread has not been initialized or has been deinitialized, the MUTEX will be NULL, therefore, lwip_hook_dns_external_resolve() that is called for any DNS query, will fail with these messages:
E (36035) OPENTHREAD: esp_openthread_task_switching_lock_acquire(38): Failed to acquire the lock because the mutex is not ready
E (36035) OPENTHREAD: esp_openthread_task_switching_lock_release(46): Failed to release the lock because the mutex is not ready
E (36046) OT_DNS64: Cannot find NAT64 prefix
The error messages are caused by esp_openthread_task_switching_lock_acquire(portMAX_DELAY); and esp_openthread_task_switching_lock_release(); calls in esp_openthread_get_nat64_prefix(), which is called from lwip_hook_dns_external_resolve()
A proposed solution would be to first check if OpenThread stack is Active before performing any operation in the lwip_hook_dns_external_resolve() routine.
The text was updated successfully, but these errors were encountered:
SuGlider
changed the title
[esp-idf][OpenThread]: When using WiFi DNS and Openthread DNS64 in the same code, an LwIP DNS Hook fail may happen
[OpenThread]: When using WiFi DNS and Openthread DNS64 in the same code, an LwIP DNS Hook fail may happen
Dec 20, 2024
github-actionsbot
changed the title
[OpenThread]: When using WiFi DNS and Openthread DNS64 in the same code, an LwIP DNS Hook fail may happen
[OpenThread]: When using WiFi DNS and Openthread DNS64 in the same code, an LwIP DNS Hook fail may happen (IDFGH-14276)
Dec 20, 2024
Answers checklist.
General issue report
@wqx6 -
The issue is related to commit f62628d#diff-c64cd8bea4c6aa81e0c356a5f4e5dd0f4f8d9507fb7efee6a11d47f3dfcb3d76R58
Lines 58 and 64 have been added to use
switching_lock
Mutex.Whenever the application tries to resolve DNS using, for instance WiFi, and OpenThread has not been initialized or has been deinitialized, the MUTEX will be NULL, therefore,
lwip_hook_dns_external_resolve()
that is called for any DNS query, will fail with these messages:This is impacting ESP 32 Arduino Framework:
espressif/arduino-esp32#10754
The error messages are caused by
esp_openthread_task_switching_lock_acquire(portMAX_DELAY);
andesp_openthread_task_switching_lock_release();
calls inesp_openthread_get_nat64_prefix()
, which is called fromlwip_hook_dns_external_resolve()
A proposed solution would be to first check if OpenThread stack is Active before performing any operation in the
lwip_hook_dns_external_resolve()
routine.The text was updated successfully, but these errors were encountered: