mirror of
https://github.com/espressif/openthread.git
synced 2026-08-13 22:27:47 +00:00
[mle] add missing defs when LONG_ROUTES is enabled (#5858)
This commit is contained in:
@@ -4026,11 +4026,11 @@ void MleRouter::FillRouteTlv(RouteTlv &aTlv, Neighbor *aNeighbor)
|
||||
|
||||
routerCount = mRouterTable.GetActiveRouterCount();
|
||||
|
||||
if (routerCount > RouteTlv::kLinkAcceptMaxRouters)
|
||||
if (routerCount > kLinkAcceptMaxRouters)
|
||||
{
|
||||
for (uint8_t routerId = 0; routerId <= kMaxRouterId; routerId++)
|
||||
{
|
||||
if (routerCount <= RouteTlv::kLinkAcceptMaxRouters)
|
||||
if (routerCount <= kLinkAcceptMaxRouters)
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -4053,7 +4053,7 @@ void MleRouter::FillRouteTlv(RouteTlv &aTlv, Neighbor *aNeighbor)
|
||||
|
||||
// Ensure that the neighbor will process the current
|
||||
// Route64 TLV in a subsequent message exchange
|
||||
routerIdSequence -= RouteTlv::kLinkAcceptSequenceRollback;
|
||||
routerIdSequence -= kLinkAcceptSequenceRollback;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -239,16 +239,6 @@ OT_TOOL_PACKED_BEGIN
|
||||
class RouteTlv : public Tlv, public TlvInfo<Tlv::kRoute>
|
||||
{
|
||||
public:
|
||||
enum
|
||||
{
|
||||
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
|
||||
kLinkAcceptMaxRouters = 3,
|
||||
#else
|
||||
kLinkAcceptMaxRouters = 20,
|
||||
#endif
|
||||
kLinkAcceptSequenceRollback = 64,
|
||||
};
|
||||
|
||||
/**
|
||||
* This method initializes the TLV.
|
||||
*
|
||||
|
||||
@@ -106,6 +106,13 @@ enum
|
||||
1000, ///< Minimum timeout(in seconds) for data poll
|
||||
kMinTimeout = (kMinTimeoutKeepAlive >= kMinTimeoutDataPoll ? kMinTimeoutKeepAlive
|
||||
: kMinTimeoutDataPoll), ///< Minimum timeout(in seconds)
|
||||
|
||||
#if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
|
||||
kLinkAcceptMaxRouters = 3, ///< Maximum Route TLV entries in a Link Accept message.
|
||||
#else
|
||||
kLinkAcceptMaxRouters = 20, ///< Maximum Route TLV entries in a Link Accept message.
|
||||
#endif
|
||||
kLinkAcceptSequenceRollback = 64, ///< Route Sequence value rollback in a Link Accept message.
|
||||
};
|
||||
|
||||
enum
|
||||
|
||||
Reference in New Issue
Block a user