Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade OTBR snap to thread-reference-20230710 #41

Merged
merged 2 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions snap/local/stage/bin/otbr-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ source $SNAP/bin/_initrc_install
###############################################################################
echo "Setup IP forwarding"
# Upstream equivalent:
# https://github.com/openthread/ot-br-posix/blob/thread-reference-20230119/script/_ipforward
# https://github.com/openthread/ot-br-posix/blob/thread-reference-20230710/script/_ipforward
sysctl -w net.ipv6.conf.all.forwarding=1
sysctl -w net.ipv4.ip_forward=1

###############################################################################
echo "Setup RT Tables for the Backbone Router"
# Upstream equivalent:
# https://github.com/openthread/ot-br-posix/blob/thread-reference-20230119/script/_rt_tables
# https://github.com/openthread/ot-br-posix/blob/thread-reference-20230710/script/_rt_tables
# Skip setting "88 openthread" routing table mapping:
# https://github.com/canonical/openthread-border-router-snap/issues/14
sysctl net.core.optmem_max=65536
Expand All @@ -66,7 +66,7 @@ echo "Setup NAT44"
# The nat44_install function in scripts/_nat64 creates a service file and sets
# firewall rules inside. We are only interested in the firewall rules.
# Upstream source:
# https://github.com/openthread/ot-br-posix/blob/thread-reference-20230119/script/_nat64
# https://github.com/openthread/ot-br-posix/blob/thread-reference-20230710/script/_nat64
echo "Set random fwmark bits"
iptables -t mangle -A PREROUTING -i $THREAD_IF -j MARK --set-mark 0x1001 -m comment --comment "OTBR"
iptables -t nat -A POSTROUTING -m mark --mark 0x1001 -j MASQUERADE -m comment --comment "OTBR"
Expand All @@ -78,7 +78,7 @@ iptables -t filter -A FORWARD -i $INFRA_IF -j ACCEPT -m comment --comment "OTBR"
###############################################################################
echo "Setup Border Routing"
# Upstream equivalent:
# https://github.com/openthread/ot-br-posix/blob/thread-reference-20230119/script/_border_routing
# https://github.com/openthread/ot-br-posix/blob/thread-reference-20230710/script/_border_routing
sysctl -w net.ipv6.conf.$INFRA_IF.accept_ra=2
sysctl -w net.ipv6.conf.$INFRA_IF.accept_ra_rt_info_max_plen=64

Expand Down
3 changes: 2 additions & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ parts:
after:
- build-bin
source: https://github.com/openthread/ot-br-posix.git
source-tag: thread-reference-20230119
source-tag: thread-reference-20230710
source-depth: 1
plugin: nil
build-packages:
Expand Down Expand Up @@ -144,6 +144,7 @@ parts:
- dhcpcd5
- libatm1
- libjsoncpp-dev
- libprotobuf-lite23
override-build: |
craftctl set version="$(git describe --tags)+snap"

Expand Down
Loading