Dataset Mgmt Certificate test clean up (#739)

* Dataset Mgmt Certificate test clean up

- Fix bug of reading commissioner session id after rx MGMT_ACTIVE_SET/MGMT_PENDING_SET
- Restore ML16 address after modifying meshlocal prefix if the node keeps attaching
- Fix bug of THCI
This commit is contained in:
Lu Wang
2016-10-03 20:55:51 -07:00
committed by Jonathan Hui
parent c3fc8fb798
commit 78bc4a245a
3 changed files with 9 additions and 3 deletions
+3 -2
View File
@@ -299,10 +299,11 @@ void DatasetManager::HandleSet(Coap::Header &aHeader, Message &aMessage, const I
if (data->GetType() == Tlv::kCommissionerSessionId)
{
uint16_t sessionId;
uint16_t rxSessionId;
sessionId = static_cast<CommissionerSessionIdTlv *>(data)->GetCommissionerSessionId();
VerifyOrExit(sessionId == static_cast<CommissionerSessionIdTlv *>(&tlv)->GetCommissionerSessionId(),
state = StateTlv::kReject);
aMessage.Read(offset + sizeof(tlv), sizeof(rxSessionId), &rxSessionId);
VerifyOrExit(sessionId == rxSessionId, state = StateTlv::kReject);
break;
}
+5
View File
@@ -489,6 +489,11 @@ ThreadError Mle::SetMeshLocalPrefix(const uint8_t *aMeshLocalPrefix)
// Add the address back into the table.
mNetif.AddUnicastAddress(mMeshLocal64);
if (mDeviceState >= kDeviceStateChild)
{
mNetif.AddUnicastAddress(mMeshLocal16);
}
// Changing the prefix also causes the mesh local address to be different.
mNetif.SetStateChangedFlags(OT_IP6_ML_ADDR_CHANGED);
+1 -1
View File
@@ -1965,7 +1965,7 @@ class ARM(IThci):
if xPanId != None:
cmd += ' panid '
cmd + str(xPanId)
cmd += str(xPanId)
if xDelayTimer != None:
cmd += ' delay '