[simulation] add IPv6 loopback address support (#12828)

This commit adds support for IPv6 loopback address (::1) in the
simulation platform. When the local interface is set to the IPv6
loopback address, it uses the interface-local multicast group
(ff01::116) instead of the link-local group (ff02::116) for
node-to-node communication.

It also ensures that the `sin6_scope_id` is correctly set for the
loopback address in the transmission socket.
This commit is contained in:
Yakun Xu
2026-05-07 22:37:40 +08:00
committed by GitHub
parent 3d731aae2f
commit 87fdaa6946
2 changed files with 25 additions and 9 deletions
+1
View File
@@ -64,6 +64,7 @@ test_ipv6()
OT_NODE_TYPE=rcp OT_SIMULATION_LOCAL_HOST=$IFACE_NAME $EXPECT_TEST
OT_NODE_TYPE=rcp OT_SIMULATION_LOCAL_HOST=$IP6ADDR $EXPECT_TEST
OT_NODE_TYPE=rcp OT_SIMULATION_LOCAL_HOST=::1 $EXPECT_TEST
}
test_ipv4()