Skip to content

Commit 409ad66

Browse files
[Inet] fix UDP bind with OT stack sha 473af53 and newer (#37579)
Testing: Tested build on NXP K32W1 with Openthread commit 473af53. Signed-off-by: Marius Preda <marius.preda@nxp.com> Co-authored-by: Gatien Chapon <43855183+chapongatien@users.noreply.github.com>
1 parent 08535fd commit 409ad66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/inet/UDPEndPointImplOpenThread.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,11 @@ CHIP_ERROR UDPEndPointImplOT::IPv6Bind(otUdpSocket & socket, const IPAddress & a
127127

128128
LockOpenThread();
129129
otUdpOpen(mOTInstance, &socket, handleUdpReceive, this);
130+
#if OPENTHREAD_API_VERSION >= 465
131+
otUdpBind(mOTInstance, &socket, &listenSockAddr, OT_NETIF_THREAD_INTERNAL);
132+
#else
130133
otUdpBind(mOTInstance, &socket, &listenSockAddr, OT_NETIF_THREAD);
134+
#endif
131135
UnlockOpenThread();
132136

133137
return chip::DeviceLayer::Internal::MapOpenThreadError(err);

0 commit comments

Comments
 (0)