From 0acba9909c69d3e71091b1d6bd0585db93a87c28 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 18 Jan 2018 11:43:47 -0800 Subject: [PATCH] [logging] remove unnecessary errors when handling Discovery Request (#2490) This commit removes the unused errors (such as when the device is not joinable or PAN Id from message does not match the device's PAN Id) in `MleRouter::HandleDiscoveryRequest()`. This suppresses the (inaccurate) MLE warning log "Failed to process Discovery Request" for above scenarios. --- src/core/thread/mle_router.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: