Files
Jonathan Hui 83d334ce85 [posix] implement address labeling for mesh-local addresses (#13101)
Ideally, the mesh-local address (ML-EID) is only used when
communicating with devices in the Thread mesh. The mesh-local
address must not be used when communicating with other devices on
the infrastructure link or outside the Thread mesh.

This commit addresses this by implementing address labeling:
1. Modifying `UpdateUnicastLinux` in `src/posix/platform/netif.cpp`
   to stop marking mesh-local addresses as deprecated. They are now
   added as preferred addresses.
2. Implementing `AddAddressLabel` and `DeleteAddressLabel` to manage
   address labels via netlink (RTM_NEWADDRLABEL/RTM_DELADDRLABEL).
3. Calling `AddAddressLabel` when a mesh-local address is added to
   assign a specific label (99) to the Mesh-Local Prefix.

This ensures that the kernel prefers the ML-EID for destinations
sharing the same label (i.e., within the Thread mesh), while
avoiding its use for external traffic where other addresses with
standard labels would be a better match.

Issue: 8443
2026-05-14 11:11:13 -07:00
..