[ncp] decode PROP_IPV6_ML_PREFIX property as [6C] (#2625)

This commit is contained in:
rongli
2018-03-20 15:55:41 +00:00
committed by Jonathan Hui
parent 449d3e7f11
commit 11f326068c
+4 -4
View File
@@ -1032,11 +1032,11 @@ otError NcpBase::SetPropertyHandler_IPV6_ML_PREFIX(void)
{
otError error = OT_ERROR_NONE;
const uint8_t *meshLocalPrefix;
uint16_t prefixLength;
uint8_t prefixLength;
SuccessOrExit(error = mDecoder.ReadData(meshLocalPrefix, prefixLength));
VerifyOrExit(prefixLength >= 8, error = OT_ERROR_PARSE);
SuccessOrExit(error = mDecoder.ReadIp6Address(meshLocalPrefix));
SuccessOrExit(error = mDecoder.ReadUint8(prefixLength));
VerifyOrExit(prefixLength == 64, error = OT_ERROR_INVALID_ARGS);
error = otThreadSetMeshLocalPrefix(mInstance, meshLocalPrefix);