diff --git a/src/core/thread/mle_router.cpp b/src/core/thread/mle_router.cpp index 470db5eda..cd85766f2 100644 --- a/src/core/thread/mle_router.cpp +++ b/src/core/thread/mle_router.cpp @@ -2753,7 +2753,7 @@ otError MleRouter::HandleDiscoveryRequest(const Message &aMessage, const Ip6::Me else // if steering data is not set out of band, fall back to network data #endif // OPENTHREAD_CONFIG_ENABLE_STEERING_DATA_SET_OOB { - VerifyOrExit(netif.GetNetworkDataLeader().IsJoiningEnabled(), error = OT_ERROR_NOT_CAPABLE); + VerifyOrExit(netif.GetNetworkDataLeader().IsJoiningEnabled()); } } @@ -2762,8 +2762,8 @@ otError MleRouter::HandleDiscoveryRequest(const Message &aMessage, const Ip6::Me case MeshCoP::Tlv::kExtendedPanId: aMessage.Read(offset, sizeof(extPanId), &extPanId); VerifyOrExit(extPanId.IsValid(), error = OT_ERROR_PARSE); - VerifyOrExit(memcmp(netif.GetMac().GetExtendedPanId(), extPanId.GetExtendedPanId(), OT_EXT_PAN_ID_SIZE), - error = OT_ERROR_DROP); + VerifyOrExit(memcmp(netif.GetMac().GetExtendedPanId(), extPanId.GetExtendedPanId(), OT_EXT_PAN_ID_SIZE)); + break; default: