openthread: forbid otPlatUdp to connect to address 0.0.0.0 and port 0

This commit is contained in:
Xu Si Yu
2023-05-26 19:20:27 +08:00
committed by Shu Chen
parent dd0afffde3
commit cb29bfa6b4

View File

@ -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();