mirror of
https://github.com/espressif/openthread.git
synced 2026-07-24 13:04:07 +00:00
Stop responding to Address Queries after consecutive tx failures to child. (#757)
- Reset consecutive failure count on receiving a 15.4 Data Request message.
This commit is contained in:
@@ -543,7 +543,9 @@ void AddressResolver::HandleAddressQuery(Coap::Header &aHeader, Message &aMessag
|
||||
|
||||
for (int i = 0; i < numChildren; i++)
|
||||
{
|
||||
if (children[i].mState != Neighbor::kStateValid || (children[i].mMode & Mle::ModeTlv::kModeFFD) != 0)
|
||||
if (children[i].mState != Neighbor::kStateValid ||
|
||||
(children[i].mMode & Mle::ModeTlv::kModeFFD) != 0 ||
|
||||
children[i].mLinkFailures >= Mle::kFailedChildTransmissions)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1693,6 +1693,7 @@ void MeshForwarder::HandleDataRequest(const Mac::Address &aMacSource, const Thre
|
||||
|
||||
VerifyOrExit((child = mMle.GetChild(aMacSource)) != NULL, ;);
|
||||
child->mLastHeard = Timer::GetNow();
|
||||
child->mLinkFailures = 0;
|
||||
|
||||
mMle.HandleMacDataRequest(*child);
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ enum
|
||||
{
|
||||
kMaxChildren = OPENTHREAD_CONFIG_MAX_CHILDREN,
|
||||
kMaxChildKeepAliveAttempts = 4, ///< Maximum keep alive attempts before attempting to reattach to a new Parent
|
||||
kFailedChildTransmissions = 4, ///< FAILED_CHILD_TRANSMISSIONS
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user