diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp index 25fc3a2bd..94b9eb160 100644 --- a/src/core/net/ip6.cpp +++ b/src/core/net/ip6.cpp @@ -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; diff --git a/src/core/net/ip6.hpp b/src/core/net/ip6.hpp index 0b507db12..45dc3c0f5 100644 --- a/src/core/net/ip6.hpp +++ b/src/core/net/ip6.hpp @@ -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. * diff --git a/src/core/net/ip6_mpl.cpp b/src/core/net/ip6_mpl.cpp index f485060a8..b9ea61193 100644 --- a/src/core/net/ip6_mpl.cpp +++ b/src/core/net/ip6_mpl.cpp @@ -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)