Merge branch 'bugfix/set_zone_when_udp_join_leave_group' into 'master'

openthread port: set ipv6 address zone with netif index when udp joining or leaving group

See merge request espressif/esp-idf!23130
This commit is contained in:
Zhang Wen Xu 2023-04-11 14:53:31 +08:00
commit 72813017ee

View File

@ -425,9 +425,10 @@ otError otPlatUdpJoinMulticastGroup(otUdpSocket *socket, otNetifIdentifier netif
otError error = OT_ERROR_NONE;
VerifyOrExit(task != NULL, error = OT_ERROR_NO_BUFS);
memcpy(task->addr.addr, addr->mFields.m8, sizeof(task->addr.addr));
task->is_join = true;
task->netif_index = get_netif_index(netif_id);
task->addr.zone = task->netif_index;
memcpy(task->addr.addr, addr->mFields.m8, sizeof(task->addr.addr));
tcpip_callback(udp_multicast_join_leave_task, task);
exit:
@ -441,9 +442,10 @@ otError otPlatUdpLeaveMulticastGroup(otUdpSocket *socket, otNetifIdentifier neti
otError error = OT_ERROR_NONE;
VerifyOrExit(task != NULL, error = OT_ERROR_NO_BUFS);
memcpy(task->addr.addr, addr->mFields.m8, sizeof(task->addr.addr));
task->is_join = false;
task->netif_index = get_netif_index(netif_id);
task->addr.zone = task->netif_index;
memcpy(task->addr.addr, addr->mFields.m8, sizeof(task->addr.addr));
tcpip_callback(udp_multicast_join_leave_task, task);
exit: