OpenThread-BR: Add runtime configuration options (#16038)

* feat(openthread-br): add nat64 support

* feat(openthread-br): add runtime config service

* chore(openthread-br): rename post-start script
This commit is contained in:
Tom Frenzel
2026-07-27 10:57:45 +02:00
committed by GitHub
parent 8bb779ea58
commit 2b2e026928
2 changed files with 48 additions and 0 deletions
+21
View File
@@ -66,7 +66,9 @@ $STD cmake -GNinja \
-DOTBR_BACKBONE_ROUTER=ON \
-DOTBR_SYSTEMD_UNIT_DIR=/etc/systemd/system \
-DOT_FIREWALL=ON \
-DOTBR_NAT64=ON \
-DOT_POSIX_NAT64_CIDR="192.168.255.0/24" \
-DOTBR_DNS_UPSTREAM_QUERY=ON \
..
$STD ninja
$STD ninja install
@@ -103,6 +105,25 @@ EOF
cat <<'EOF' >/etc/default/otbr-web
OTBR_WEB_OPTS="-I wpan0 -a 0.0.0.0 -p 80"
EOF
cat <<'EOF' >/usr/local/bin/otbr-post-start.sh
#!/bin/sh
# OpenThread Border Router post-start script
# Run custom commands for runtime configuration options
# Wait for the otbr-agent service to be initialized
#sleep 3
# Configure routing and translation features
#ot-ctl nat64 enable
#ot-ctl dns server upstream enable
EOF
chmod +x /usr/local/bin/otbr-post-start.sh
mkdir -p /etc/systemd/system/otbr-agent.service.d
cat <<'EOF' >/etc/systemd/system/otbr-agent.service.d/10-otbr-post-start.conf
[Service]
ExecStartPost=/usr/local/bin/otbr-post-start.sh
EOF
systemctl enable -q dbus rsyslog otbr-agent otbr-web
systemctl enable -q bind9 2>/dev/null || systemctl enable -q named 2>/dev/null || true
systemctl start -q dbus rsyslog bind9