From 184b9374cc8faa71917ea68710624e034f7da483 Mon Sep 17 00:00:00 2001 From: Mengyi Wang Date: Fri, 9 Feb 2024 13:59:09 +0100 Subject: [PATCH 1/2] Upgrade OTBR snap to thread-reference-20230710 --- snap/snapcraft.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 249f0ce..4ec891c 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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: @@ -144,6 +144,7 @@ parts: - dhcpcd5 - libatm1 - libjsoncpp-dev + - libprotobuf-lite23 override-build: | craftctl set version="$(git describe --tags)+snap" From 2355496bfec33c8cb1961e26a9baf314036097f2 Mon Sep 17 00:00:00 2001 From: Mengyi Date: Fri, 16 Feb 2024 16:51:06 +0100 Subject: [PATCH 2/2] Update comments --- snap/local/stage/bin/otbr-setup.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snap/local/stage/bin/otbr-setup.sh b/snap/local/stage/bin/otbr-setup.sh index 63393e5..1df6227 100755 --- a/snap/local/stage/bin/otbr-setup.sh +++ b/snap/local/stage/bin/otbr-setup.sh @@ -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 @@ -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" @@ -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