Skip to content

Commit

Permalink
Merge pull request #3 from Cascoda/elie-mpl-seed-set-no-update
Browse files Browse the repository at this point in the history
[Mpl] Don't maintain a seed set if rx-off-when-idle
  • Loading branch information
elie-elkhoury committed Apr 5, 2024
2 parents f981008 + fac6b94 commit fb85d00
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/core/net/ip6_mpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#include "common/serial_number.hpp"
#include "net/ip6.hpp"

#include <openthread/thread.h>

namespace ot {
namespace Ip6 {

Expand Down Expand Up @@ -95,7 +97,13 @@ Error Mpl::ProcessOption(Message &aMessage, const Address &aAddress, bool aIsOut
}

// Check if the MPL Data Message is new.
error = UpdateSeedSet(option.GetSeedId(), option.GetSequence());
// NOTE: Don't maintain the seed set if the device is a rx-off-when-idle child,
// because that causes the sleepy device to wake up periodically in order
// to update the LifeTimes in the Seed Set.
if (otThreadGetLinkMode(GetInstancePtr()).mRxOnWhenIdle)
error = UpdateSeedSet(option.GetSeedId(), option.GetSequence());
else
error = kErrorNone;

if (error == kErrorNone)
{
Expand Down
3 changes: 3 additions & 0 deletions src/core/net/ip6_mpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ class Mpl : public InstanceLocator, private NonCopyable
TimerMilli mRetransmissionTimer;
uint8_t mTimerExpirations;
#endif // OPENTHREAD_FTD

otInstance *GetInstancePtr(void) { return reinterpret_cast<otInstance *>(&InstanceLocator::GetInstance()); }

};

/**
Expand Down

0 comments on commit fb85d00

Please sign in to comment.