diff --git a/packages/omamobile-device-cheetah/test/all b/packages/omamobile-device-cheetah/test/all index 695081b94..b9ae8bcc9 100755 --- a/packages/omamobile-device-cheetah/test/all +++ b/packages/omamobile-device-cheetah/test/all @@ -17,6 +17,20 @@ pass "build stays inside the package directory" ./build "$tmp/build" || fail "C tools compile" pass "C tools compile" +# The host is a fallback gateway; Wi-Fi DHCP (metric 600) wins. +python3 - <<'ROUTE' +import configparser +from pathlib import Path +p = configparser.ConfigParser(strict=False) +p.read('vendor/systemd/network/20-usb-gadget.network') +assert p['Match']['Name'] == 'usb0' +assert p['Network']['Address'] == '172.16.42.1/24' +assert 'Gateway' not in p['Network'] +assert p['Route']['Gateway'] == '172.16.42.2' +assert p['Route'].getint('Metric') == 1024 +ROUTE +pass "USB gateway is a fallback route in the Route section" + # omamobile-bootctl against a synthetic devinfo: dump works, and a dry run # of mark-successful plans exactly one flag byte and writes nothing python3 - "$tmp/devinfo" <<'PY' diff --git a/packages/omamobile-device-cheetah/vendor/systemd/network/20-usb-gadget.network b/packages/omamobile-device-cheetah/vendor/systemd/network/20-usb-gadget.network index 4e30191f6..826f55698 100644 --- a/packages/omamobile-device-cheetah/vendor/systemd/network/20-usb-gadget.network +++ b/packages/omamobile-device-cheetah/vendor/systemd/network/20-usb-gadget.network @@ -2,13 +2,19 @@ # Omarchy Mobile: USB networking to the host. The initramfs sets up the USB # gadget (CDC NCM) before handing over to Arch; this gives it an address. # The host shares its internet over this link (NetworkManager "shared" -# mode on 172.16.42.2), so it is also the gateway. DNS goes to public resolvers. +# mode on 172.16.42.2), so it is also a gateway, but only as a fallback: +# metric 1024 lets Wi-Fi's DHCP route (NetworkManager, metric 600) win when it is +# up. With metric 0 here, internet traffic went to the host while Wi-Fi was +# connected (2026-10-30). DNS goes to public resolvers. [Match] Name=usb0 [Network] Address=172.16.42.1/24 -Gateway=172.16.42.2 DNS=1.1.1.1 DNS=9.9.9.9 ConfigureWithoutCarrier=yes + +[Route] +Gateway=172.16.42.2 +Metric=1024 diff --git a/packages/omamobile-device-cheetah/version b/packages/omamobile-device-cheetah/version index 50140e353..9dd179330 100644 --- a/packages/omamobile-device-cheetah/version +++ b/packages/omamobile-device-cheetah/version @@ -1 +1 @@ -0.1.33 +0.1.34