mirror of
https://github.com/espressif/openthread.git
synced 2026-06-05 21:14:49 +00:00
83d334ce85
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
50 lines
1.3 KiB
Docker
50 lines
1.3 KiB
Docker
# Ubuntu image with tools required to build OpenThread
|
|
FROM ubuntu:22.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
ENV LANG=en_US.UTF-8
|
|
ENV INSTALL_FORMAT_TOOLS=0
|
|
# Resolves issue with installing libc-bin
|
|
RUN rm /var/lib/dpkg/info/libc-bin.* \
|
|
&& apt-get clean -y \
|
|
&& apt-get update -y \
|
|
&& apt-get install --no-install-recommends -y libc-bin
|
|
|
|
RUN set -x \
|
|
&& apt-get update -y \
|
|
&& apt-get install -y locales \
|
|
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
|
|
&& apt-get --no-install-recommends install -fy \
|
|
bzip2 \
|
|
git \
|
|
ninja-build \
|
|
python3 \
|
|
python3-pip \
|
|
python3-setuptools \
|
|
software-properties-common \
|
|
sudo \
|
|
netbase \
|
|
inetutils-ping \
|
|
ca-certificates \
|
|
&& update-ca-certificates \
|
|
&& python3 -m pip install -U pip \
|
|
&& python3 -m pip install -U cmake \
|
|
&& python3 -m pip install wheel
|
|
|
|
# set up openthread simulation cli example apps
|
|
WORKDIR /
|
|
COPY . openthread
|
|
RUN set -x \
|
|
&& cd openthread \
|
|
&& ./script/bootstrap \
|
|
&& mkdir -p build \
|
|
&& cd build \
|
|
&& cmake -GNinja -DOT_COMMISSIONER=ON -DOT_JOINER=ON -DOT_PLATFORM=simulation .. \
|
|
&& ninja
|
|
|
|
# set up ot-daemon
|
|
WORKDIR /
|
|
RUN set -x \
|
|
&& cd openthread \
|
|
&& ./script/cmake-build posix -DOT_DAEMON=ON
|