mirror of
https://github.com/espressif/openthread.git
synced 2026-08-13 14:17:47 +00:00
[mlr] remove unnecessary calls to UpdateMldReport (#7167)
This commit removes incorrect calls to UpdateMldReport. - UpdateMldReport(MA, true) should be called when a MA is registered, thus in MulticastRoutingManager::Add. - UpdateMldReport(MA, false) should be called when a MA is expired, thus in MulticastRoutingManager::Remove. Note that removing an Multicast Forwarding Cache (MFC) does not mean the MA is expired. The MFCs can be freely removed even when the MA is still registered and being renewed.
This commit is contained in:
@@ -370,7 +370,6 @@ void MulticastRoutingManager::RemoveInboundMulticastForwardingCache(const Ip6::A
|
||||
{
|
||||
if (mfc.IsValid() && mfc.mIif == kMifIndexBackbone && mfc.mGroupAddr == aGroupAddr)
|
||||
{
|
||||
UpdateMldReport(mfc.mGroupAddr, false);
|
||||
RemoveMulticastForwardingCache(mfc);
|
||||
}
|
||||
}
|
||||
@@ -395,7 +394,6 @@ void MulticastRoutingManager::ExpireMulticastForwardingCache(void)
|
||||
{
|
||||
if (!UpdateMulticastRouteInfo(mfc))
|
||||
{
|
||||
UpdateMldReport(mfc.mGroupAddr, false);
|
||||
// The multicast route is expired
|
||||
RemoveMulticastForwardingCache(mfc);
|
||||
}
|
||||
@@ -561,7 +559,6 @@ void MulticastRoutingManager::SaveMulticastForwardingCache(const Ip6::Address &
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateMldReport(oldest->mGroupAddr, false);
|
||||
RemoveMulticastForwardingCache(*oldest);
|
||||
oldest->Set(aSrcAddr, aGroupAddr, aIif, aOif);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user