Only check tlvs affect connectivity for MGMT_ACTIVE_SET (#694)

* Only check tlvs affect connectivity for MGMT_ACTIVE_SET
This commit is contained in:
Lu Wang
2016-09-27 09:07:24 -07:00
committed by Jonathan Hui
parent 9a425c1348
commit 461495eed3
+2 -2
View File
@@ -265,8 +265,8 @@ void DatasetManager::HandleSet(Coap::Header &aHeader, Message &aMessage, const I
}
// verify the request does not include fields that affect connectivity
if (tlvType == Tlv::kChannel || tlvType == Tlv::kMeshLocalPrefix ||
tlvType == Tlv::kPanId || tlvType == Tlv::kNetworkMasterKey)
if ((type == Tlv::kActiveTimestamp) && (tlvType == Tlv::kChannel || tlvType == Tlv::kMeshLocalPrefix
|| tlvType == Tlv::kPanId || tlvType == Tlv::kNetworkMasterKey))
{
ExitNow(state = StateTlv::kReject);
}