diff --git a/src/core/meshcop/leader.cpp b/src/core/meshcop/leader.cpp index 55e7d35c1..93ee0e798 100644 --- a/src/core/meshcop/leader.cpp +++ b/src/core/meshcop/leader.cpp @@ -61,7 +61,7 @@ Leader::Leader(Instance &aInstance) , mKeepAlive(OT_URI_PATH_LEADER_KEEP_ALIVE, Leader::HandleKeepAlive, this) , mTimer(aInstance, HandleTimer, this) , mDelayTimerMinimal(DelayTimerTlv::kDelayTimerMinimal) - , mSessionId(0xffff) + , mSessionId(Random::GetUint16()) { GetNetif().GetCoap().AddResource(mPetition); GetNetif().GetCoap().AddResource(mKeepAlive);