Limit MPL forwarding to Thread Routers. (#996)

This commit is contained in:
Jonathan Hui
2016-11-21 18:13:48 +00:00
committed by GitHub
parent 47ff5ec0c3
commit 7c8d784f5b
3 changed files with 14 additions and 0 deletions
+5
View File
@@ -68,6 +68,11 @@ Message *Ip6::NewMessage(uint16_t reserved)
return mMessagePool.New(Message::kTypeIp6, sizeof(Header) + sizeof(HopByHopHeader) + sizeof(OptionMpl) + reserved);
}
bool Ip6::IsForwardingEnabled(void)
{
return mForwardingEnabled;
}
void Ip6::SetForwardingEnabled(bool aEnable)
{
mForwardingEnabled = aEnable;
+8
View File
@@ -243,6 +243,14 @@ public:
*/
void SetReceiveIp6FilterEnabled(bool aEnabled);
/**
* This method indicates whether or not IPv6 forwarding is enabled.
*
* @returns TRUE if IPv6 forwarding is enabled, FALSE otherwise.
*
*/
bool IsForwardingEnabled(void);
/**
* This method enables/disables IPv6 forwarding.
*
+1
View File
@@ -166,6 +166,7 @@ void Mpl::AddBufferedMessage(Message &aMessage, uint16_t aSeedId, uint8_t aSeque
uint32_t nextTransmissionTime;
uint8_t hopLimit;
VerifyOrExit(GetTimerExpirations() > 0,);
VerifyOrExit((messageCopy = aMessage.Clone()) != NULL, error = kThreadError_NoBufs);
if (!aIsOutbound)