diff --git a/src/cli/cli.cpp b/src/cli/cli.cpp index dae4d2d8a..8812cf7e2 100644 --- a/src/cli/cli.cpp +++ b/src/cli/cli.cpp @@ -2132,12 +2132,20 @@ exit: otError Interpreter::ProcessIpMulticastAddrAdd(Arg aArgs[]) { - otError error; otIp6Address address; +#if OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE + otError error = OT_ERROR_INVALID_ARGS; + for (Arg *arg = &aArgs[0]; !arg->IsEmpty(); arg++) + { + SuccessOrExit(error = arg->ParseAsIp6Address(address)); + SuccessOrExit(error = otIp6SubscribeMulticastAddress(GetInstancePtr(), &address)); + } +#else + otError error; SuccessOrExit(error = aArgs[0].ParseAsIp6Address(address)); error = otIp6SubscribeMulticastAddress(GetInstancePtr(), &address); - +#endif exit: return error; }