[mesh-forwarder] fix ip6 route selection for the deprecated OMR addresses (#11332)

This commit is contained in:
Zhangwx
2025-03-12 22:52:57 -07:00
committed by GitHub
parent 1f37da29e5
commit 4c0af02513
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -293,6 +293,13 @@ public:
*/
static const char *EcnToString(Ecn aEcn);
/**
* Indicates whether the address is on the thread link or not.
*
* @returns TRUE if the address is on the thread link, FALSE otherwise.
*/
bool IsOnLink(const Address &aAddress) const;
#if OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE
typedef otBorderRoutingCounters BrCounters; ///< Border Routing counters.
@@ -376,7 +383,6 @@ private:
OwnedPtr<Message> &aMessagePtr,
uint8_t aIpProto,
Message::Ownership aMessageOwnership);
bool IsOnLink(const Address &aAddress) const;
Error RouteLookup(const Address &aSource, const Address &aDestination) const;
#if OPENTHREAD_CONFIG_IP6_BR_COUNTERS_ENABLE
void UpdateBorderRoutingCounters(const Header &aHeader, uint16_t aMessageLength, bool aIsInbound);
+1 -1
View File
@@ -433,7 +433,7 @@ Error MeshForwarder::UpdateIp6RouteFtd(const Ip6::Header &aIp6Header, Message &a
{
mMeshDest = neighbor->GetRloc16();
}
else if (Get<NetworkData::Leader>().IsOnMesh(aIp6Header.GetDestination()))
else if (Get<Ip6::Ip6>().IsOnLink(aIp6Header.GetDestination()))
{
SuccessOrExit(error = Get<AddressResolver>().Resolve(aIp6Header.GetDestination(), mMeshDest));
}