From 1241bfc73d4e2d44d02add5ebe0a8235146fead0 Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Wed, 24 May 2023 17:38:41 +0800 Subject: [PATCH 1/4] openthread rcp: set link metrics feature optional --- .../private_include/openthread-core-esp32x-radio-config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/openthread/private_include/openthread-core-esp32x-radio-config.h b/components/openthread/private_include/openthread-core-esp32x-radio-config.h index f58432903b..24942a7f31 100644 --- a/components/openthread/private_include/openthread-core-esp32x-radio-config.h +++ b/components/openthread/private_include/openthread-core-esp32x-radio-config.h @@ -207,6 +207,7 @@ #define OPENTHREAD_RADIO 1 +#if CONFIG_OPENTHREAD_LINK_METRICS /** * @def OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE * @@ -216,3 +217,4 @@ #ifndef OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE #define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 1 #endif +#endif //CONFIG_OPENTHREAD_LINK_METRICS From 3f52b00948b7e747ae6b9a7c4a7f71c2cbf78f5a Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Wed, 24 May 2023 18:01:17 +0800 Subject: [PATCH 2/4] openthread cli: set dua feature optional --- components/openthread/Kconfig | 7 +++++++ .../private_include/openthread-core-esp32x-ftd-config.h | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/components/openthread/Kconfig b/components/openthread/Kconfig index 03f154d11c..a4ce8c03ed 100644 --- a/components/openthread/Kconfig +++ b/components/openthread/Kconfig @@ -221,4 +221,11 @@ menu "OpenThread" default n help Select this option to set rx on when sleep in CSL feature, only for debug + + config OPENTHREAD_DUA_ENABLE + bool "Enable Domain Unicast Address feature" + depends on OPENTHREAD_ENABLED + default n + help + Only used for Thread1.2 certification endmenu diff --git a/components/openthread/private_include/openthread-core-esp32x-ftd-config.h b/components/openthread/private_include/openthread-core-esp32x-ftd-config.h index 2cb8ede33c..ab8e41a586 100644 --- a/components/openthread/private_include/openthread-core-esp32x-ftd-config.h +++ b/components/openthread/private_include/openthread-core-esp32x-ftd-config.h @@ -371,6 +371,7 @@ */ #define OPENTHREAD_CONFIG_PING_SENDER_ENABLE 1 +#if CONFIG_OPENTHREAD_DUA_ENABLE /** * @def OPENTHREAD_CONFIG_DUA_ENABLE * @@ -378,8 +379,9 @@ * */ #ifndef OPENTHREAD_CONFIG_DUA_ENABLE -#define OPENTHREAD_CONFIG_DUA_ENABLE 0 +#define OPENTHREAD_CONFIG_DUA_ENABLE 1 #endif +#endif //CONFIG_OPENTHREAD_DUA_ENABLE /** * @def OPENTHREAD_CONFIG_MLR_ENABLE From c1581eb6b891b4fe1bed3a697e4221652c49a505 Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Fri, 26 May 2023 19:20:27 +0800 Subject: [PATCH 3/4] openthread: forbid otPlatUdp to connect to address 0.0.0.0 and port 0 --- components/openthread/port/esp_openthread_udp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/openthread/port/esp_openthread_udp.c b/components/openthread/port/esp_openthread_udp.c index 17f8256a38..08c8e12e6c 100644 --- a/components/openthread/port/esp_openthread_udp.c +++ b/components/openthread/port/esp_openthread_udp.c @@ -305,6 +305,9 @@ otError otPlatUdpConnect(otUdpSocket *udp_socket) }; task.addr = map_openthread_addr_to_lwip_addr(&udp_socket->mPeerName.mAddress); + if (ip_addr_isany_val(task.addr) && task.port == 0) { + return OT_ERROR_NONE; + } tcpip_callback(udp_connect_task, &task); wait_for_task_notification(); From 6b6984b4a8f0da0804c73d4fbc15251d21f0f13a Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Fri, 2 Jun 2023 12:05:36 +0800 Subject: [PATCH 4/4] ot br lib: update br lib to fix issues found in certification --- components/openthread/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/openthread/lib b/components/openthread/lib index 2e5a3f236f..fed28dde58 160000 --- a/components/openthread/lib +++ b/components/openthread/lib @@ -1 +1 @@ -Subproject commit 2e5a3f236f8cd7c753fd8b8f775e48e8be5f08d6 +Subproject commit fed28dde58d5d4a46d3acc4935a23b43fe82b320