mirror of
https://github.com/espressif/openthread.git
synced 2026-07-27 06:17:47 +00:00
[joiner] refresh ID from EUI-64 in Start() when discerner is empty (#12393)
This commit updates `Joiner::Start()` to explicitly call `SetIdFromIeeeEui64()` when `mDiscerner` is empty. This ensures that the Joiner ID is freshly derived from the current IEEE EUI-64 address, guaranteeing correctness even if the address was not ready during initialization or has changed since the instance was created.
This commit is contained in:
@@ -128,6 +128,11 @@ Error Joiner::Start(const char *aPskd,
|
||||
|
||||
SuccessOrExit(error = Get<Tmf::SecureAgent>().Open(Ip6::NetifIdentifier::kNetifThreadInternal));
|
||||
|
||||
if (mDiscerner.IsEmpty())
|
||||
{
|
||||
SetIdFromIeeeEui64();
|
||||
}
|
||||
|
||||
// After this, if any of the steps fails, we need to cleanup
|
||||
// (free allocated message, stop seeker, close agent, etc).
|
||||
shouldCleanup = true;
|
||||
|
||||
Reference in New Issue
Block a user