mirror of
https://github.com/espressif/openthread.git
synced 2026-08-02 00:57:47 +00:00
[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.
This commit is contained in:
committed by
Jonathan Hui
parent
f19ee244e8
commit
0acba9909c
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user