diff --git a/thread/tests/integration/src/android/net/thread/BorderRoutingTest.java b/thread/tests/integration/src/android/net/thread/BorderRoutingTest.java index 1f27f068d4..75546109ef 100644 --- a/thread/tests/integration/src/android/net/thread/BorderRoutingTest.java +++ b/thread/tests/integration/src/android/net/thread/BorderRoutingTest.java @@ -41,6 +41,7 @@ import static com.google.common.io.BaseEncoding.base16; import static com.google.common.util.concurrent.MoreExecutors.directExecutor; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assume.assumeNotNull; @@ -450,6 +451,55 @@ public class BorderRoutingTest { ICMPV6_ECHO_REQUEST_TYPE, ftd.getOmrAddress(), GROUP_ADDR_SCOPE_3)); } + @Test + public void multicastRouting_outboundForwarding_llaToScope4IsNotForwarded() throws Exception { + assumeTrue(isKernelVersionAtLeast(KERNEL_VERSION_MULTICAST_ROUTING_SUPPORTED)); + /* + *
+ * Topology: + * infra network Thread + * infra device -------------------- Border Router -------------- Full Thread device + * (Cuttlefish) + *+ */ + + FullThreadDevice ftd = mFtds.get(0); + startFtdChild(ftd); + Inet6Address ftdLla = ftd.getLinkLocalAddress(); + assertNotNull(ftdLla); + + ftd.ping(GROUP_ADDR_SCOPE_4, ftdLla, 100 /* size */, 1 /* count */); + + assertNull( + pollForPacketOnInfraNetwork(ICMPV6_ECHO_REQUEST_TYPE, ftdLla, GROUP_ADDR_SCOPE_4)); + } + + @Test + public void multicastRouting_outboundForwarding_mlaToScope4IsNotForwarded() throws Exception { + assumeTrue(isKernelVersionAtLeast(KERNEL_VERSION_MULTICAST_ROUTING_SUPPORTED)); + /* + *
+ * Topology: + * infra network Thread + * infra device -------------------- Border Router -------------- Full Thread device + * (Cuttlefish) + *+ */ + + FullThreadDevice ftd = mFtds.get(0); + startFtdChild(ftd); + List
This methods goes through all unicast addresses on the device and returns the address that
+ * begins with fe80.
+ */
+ public Inet6Address getLinkLocalAddress() {
+ List This methods goes through all unicast addresses on the device and returns the address that
+ * begins with mesh-local prefix.
+ */
+ public List