Skip to content

Commit 4cacb71

Browse files
committed
[border-agent] try getting coap dtls session from ephemeral key manager
1 parent 36a8f71 commit 4cacb71

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/meshcop/border_agent.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,14 @@ BorderAgent::CoapDtlsSession *BorderAgent::FindActiveCommissionerSession(void)
280280
}
281281
}
282282

283+
#if OPENTHREAD_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ENABLE
284+
CoapDtlsSession *coapSession = GetEphemeralKeyManager().mCoapDtlsSession;
285+
if (coapSession && coapSession->IsActiveCommissioner())
286+
{
287+
commissionerSession = coapSession;
288+
}
289+
#endif
290+
283291
return commissionerSession;
284292
}
285293

0 commit comments

Comments
 (0)