[dtls] fix undesired kernel filtering of connected UDP (#10069)

This commit fixes again the same issue which was fixed by
https://github.com/openthread/openthread/pull/8168 with the same
approach. The regression was unintentionally introduced by the initial
TCAT commit https://github.com/openthread/openthread/pull/9210

See https://github.com/openthread/openthread/pull/8168 for the
background and discussion.
This commit is contained in:
Kangping
2024-04-29 09:13:04 -07:00
committed by GitHub
parent e89b989703
commit 0884a1be42
+1 -8
View File
@@ -220,17 +220,11 @@ void SecureTransport::HandleReceive(Message &aMessage, const Ip6::MessageInfo &a
mRemainingConnectionAttempts--;
}
IgnoreError(mSocket.Connect(Ip6::SockAddr(aMessageInfo.GetPeerAddr(), aMessageInfo.GetPeerPort())));
mMessageInfo.SetPeerAddr(aMessageInfo.GetPeerAddr());
mMessageInfo.SetPeerPort(aMessageInfo.GetPeerPort());
mMessageInfo.SetIsHostInterface(aMessageInfo.IsHostInterface());
if (Get<ThreadNetif>().HasUnicastAddress(aMessageInfo.GetSockAddr()))
{
mMessageInfo.SetSockAddr(aMessageInfo.GetSockAddr());
}
mMessageInfo.SetSockAddr(aMessageInfo.GetSockAddr());
mMessageInfo.SetSockPort(aMessageInfo.GetSockPort());
SuccessOrExit(Setup(false));
@@ -514,7 +508,6 @@ void SecureTransport::Disconnect(void)
mTimer.Start(kGuardTimeNewConnectionMilli);
mMessageInfo.Clear();
IgnoreError(mSocket.Connect());
FreeMbedtls();