mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
openthread: forbid otPlatUdp to connect to address 0.0.0.0 and port 0
This commit is contained in:
@ -305,6 +305,9 @@ otError otPlatUdpConnect(otUdpSocket *udp_socket)
|
|||||||
};
|
};
|
||||||
|
|
||||||
task.addr = map_openthread_addr_to_lwip_addr(&udp_socket->mPeerName.mAddress);
|
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);
|
tcpip_callback(udp_connect_task, &task);
|
||||||
wait_for_task_notification();
|
wait_for_task_notification();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user