[ip6] remove IPv6 multicast forwarding to sleepys from MTD build (#4730)
diff --git a/src/core/net/ip6.cpp b/src/core/net/ip6.cpp
index 11c0ead..83d3a3d 100644
--- a/src/core/net/ip6.cpp
+++ b/src/core/net/ip6.cpp
@@ -305,6 +305,7 @@
}
else
{
+#if OPENTHREAD_FTD
if (aHeader.GetDestination().IsMulticastLargerThanRealmLocal() &&
Get<Mle::MleRouter>().HasSleepyChildrenSubscribed(aHeader.GetDestination()))
{
@@ -320,6 +321,7 @@
otLogWarnIp6("No enough buffer for message copy for indirect transmission to sleepy children");
}
}
+#endif
SuccessOrExit(error = AddTunneledMplOption(aMessage, aHeader, aMessageInfo));
}
@@ -510,6 +512,7 @@
if (aMessageInfo.GetPeerAddr().IsMulticastLargerThanRealmLocal())
{
+#if OPENTHREAD_FTD
if (Get<Mle::MleRouter>().HasSleepyChildrenSubscribed(header.GetDestination()))
{
Message *messageCopy = NULL;
@@ -524,6 +527,7 @@
otLogWarnIp6("No enough buffer for message copy for indirect transmission to sleepy children");
}
}
+#endif
SuccessOrExit(error = AddTunneledMplOption(aMessage, header, aMessageInfo));
}
@@ -1178,11 +1182,13 @@
multicastPromiscuous = true;
}
+#if OPENTHREAD_FTD
if (header.GetDestination().IsMulticastLargerThanRealmLocal() &&
Get<Mle::MleRouter>().HasSleepyChildrenSubscribed(header.GetDestination()))
{
forward = true;
}
+#endif
}
else
{
diff --git a/src/core/thread/mle_router_mtd.hpp b/src/core/thread/mle_router_mtd.hpp
index 6837e41..95831bf 100644
--- a/src/core/thread/mle_router_mtd.hpp
+++ b/src/core/thread/mle_router_mtd.hpp
@@ -77,8 +77,6 @@
otError SendChildUpdateRequest(void) { return Mle::SendChildUpdateRequest(); }
otError GetMaxChildTimeout(uint32_t &) { return OT_ERROR_NOT_IMPLEMENTED; }
-
- bool HasSleepyChildrenSubscribed(const Ip6::Address &) { return false; }
};
} // namespace Mle