mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
[mle] remove OPENTHREAD_CONFIG_MLE_IP_ADDRS_TO_REGISTER (#12997)
This commit removes the `OPENTHREAD_CONFIG_MLE_IP_ADDRS_TO_REGISTER` configuration option and the logic in `Mle` that limited the number of IPv6 addresses registered by an MTD with its parent. By removing this limit, MTDs will now attempt to register all their valid unicast and multicast addresses. The parent router still enforces its own limit on the number of addresses it accepts and stores per child via `OPENTHREAD_CONFIG_MLE_IP_ADDRS_PER_CHILD`. An error check is added to `openthread-core-config-check.h` to inform users of the removal of this configuration macro.
This commit is contained in:
committed by
GitHub
parent
badb895045
commit
d37e9df698
@@ -82,15 +82,6 @@
|
||||
#define OPENTHREAD_CONFIG_MLE_IP_ADDRS_PER_CHILD 4
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MLE_IP_ADDRS_TO_REGISTER
|
||||
*
|
||||
* The maximum number of IPv6 address registrations for MTD.
|
||||
*/
|
||||
#ifndef OPENTHREAD_CONFIG_MLE_IP_ADDRS_TO_REGISTER
|
||||
#define OPENTHREAD_CONFIG_MLE_IP_ADDRS_TO_REGISTER (OPENTHREAD_CONFIG_MLE_IP_ADDRS_PER_CHILD)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @def OPENTHREAD_CONFIG_MLE_DEVICE_PROPERTY_LEADER_WEIGHT_ENABLE
|
||||
*
|
||||
|
||||
@@ -698,4 +698,8 @@
|
||||
#error "OPENTHREAD_CONFIG_DTLS_ENABLE was replaced by OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE"
|
||||
#endif
|
||||
|
||||
#ifdef OPENTHREAD_CONFIG_MLE_IP_ADDRS_TO_REGISTER
|
||||
#error "OPENTHREAD_CONFIG_MLE_IP_ADDRS_TO_REGISTER is removed. All addresses are now registered."
|
||||
#endif
|
||||
|
||||
#endif // OT_CORE_CONFIG_OPENTHREAD_CORE_CONFIG_CHECK_H_
|
||||
|
||||
@@ -3645,7 +3645,6 @@ Error Mle::TxMessage::AppendAddressRegistrationTlv(AddressRegistrationMode aMode
|
||||
{
|
||||
Error error = kErrorNone;
|
||||
Tlv::Bookmark tlvBookmark;
|
||||
uint8_t counter = 0;
|
||||
|
||||
SuccessOrExit(error = Tlv::StartTlv(*this, Tlv::kAddressRegistration, tlvBookmark));
|
||||
|
||||
@@ -3654,14 +3653,12 @@ Error Mle::TxMessage::AppendAddressRegistrationTlv(AddressRegistrationMode aMode
|
||||
|
||||
// Continue to append the other addresses if not `kAppendMeshLocalOnly` mode
|
||||
VerifyOrExit(aMode != kAppendMeshLocalOnly);
|
||||
counter++;
|
||||
|
||||
#if OPENTHREAD_CONFIG_DUA_ENABLE
|
||||
if (Get<ThreadNetif>().HasUnicastAddress(Get<DuaManager>().GetDomainUnicastAddress()))
|
||||
{
|
||||
// Prioritize DUA, compressed entry
|
||||
SuccessOrExit(error = AppendAddressRegistrationEntry(Get<DuaManager>().GetDomainUnicastAddress()));
|
||||
counter++;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3685,9 +3682,6 @@ Error Mle::TxMessage::AppendAddressRegistrationTlv(AddressRegistrationMode aMode
|
||||
#endif
|
||||
|
||||
SuccessOrExit(error = AppendAddressRegistrationEntry(addr.GetAddress()));
|
||||
counter++;
|
||||
// only continue to append if there is available entry.
|
||||
VerifyOrExit(counter < kMaxIpAddressesToRegister);
|
||||
}
|
||||
|
||||
// Append external multicast addresses. For sleepy end device,
|
||||
@@ -3715,9 +3709,6 @@ Error Mle::TxMessage::AppendAddressRegistrationTlv(AddressRegistrationMode aMode
|
||||
#endif
|
||||
|
||||
SuccessOrExit(error = AppendAddressRegistrationEntry(addr.GetAddress()));
|
||||
counter++;
|
||||
// only continue to append if there is available entry.
|
||||
VerifyOrExit(counter < kMaxIpAddressesToRegister);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1322,7 +1322,6 @@ private:
|
||||
static constexpr uint8_t kMleHopLimit = 255;
|
||||
static constexpr uint8_t kMleSecurityTagSize = 4;
|
||||
static constexpr uint32_t kDefaultStoreFrameCounterAhead = OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD;
|
||||
static constexpr uint8_t kMaxIpAddressesToRegister = OPENTHREAD_CONFIG_MLE_IP_ADDRS_TO_REGISTER;
|
||||
static constexpr uint32_t kDefaultChildTimeout = OPENTHREAD_CONFIG_MLE_CHILD_TIMEOUT_DEFAULT;
|
||||
static constexpr uint32_t kDefaultCslTimeout = OPENTHREAD_CONFIG_CSL_TIMEOUT;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user