Repository navigation
omamobile-modem-sit 0.3.42: a default route on a down link no longer keeps the cellular route away - #759
omamobile-modem-sit 0.3.42: a default route on a down link no longer keeps the cellular route away#759den-kloot wants to merge 1 commit into
Conversation
|
Thank you for finding this, and for the careful write-up: a route on a link with no cable counting as a way out is an easy thing to miss, and your test on the 9a shows it plainly. It isn't only the 9a's: the Pixel 7 Pro's
Thanks again; this one will likely help a lot of people who use their phones away from home. |
…keeps the cellular route away After a silent spell (the network dropped packet registration for four minutes) omamobile-sit-data removed the cellular default route as intended, but never put it back once the bearer carried traffic again: it only re-adds the route when nothing else leads out, and the USB gadget's fallback route (20-usb-gadget.network, ConfigureWithoutCarrier=yes, metric 2048) is always there, flagged linkdown without a cable. On a Pixel 9a with Wi-Fi off the phone stayed offline until a reboot. Routes on a down link now count as no other exit. The other device packages carry the same fallback route, so this changes two more things on every phone with the cable out, both decided from the same list: - The carrier's DNS. "cellular = routed and not others" was never true on mobile data without a cable and without Wi-Fi, because the USB route counted as another way out, so the carrier's DNS was never used there. Now it is, which is what the resolver was written for. - The return after a sleep (SleepHold, derekross#791). With the USB route counted, the cellular route came back at once after every sleep, logged as "behind Wi-Fi" even with Wi-Fi off. Now it waits for a route that leads out, or the 10 s grace, as intended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
3be26d3 to
b41dd2d
Compare
|
Thanks for looking at what else the list feeds; I had only followed it to the route. Rebased onto main (
|
|
Thank you, this is everything I asked for: the rebase, a commit message that says what changes on every phone, and a test for the sleep hold. Your 9a table is very clear, including the honest note that sitd itself was still 0.3.35. I checked that both new tests fail when the filter goes back to main's. Two things on my side before it merges:
The "Wi-Fi/other" wording you noticed for the moment with no route at all is worth a small follow-up if you feel like it, but not here. |
What and why
With Wi-Fi off, a short cellular dropout left the phone offline until a reboot.
What happened on a Pixel 9a: the network dropped packet registration for about four minutes.
omamobile-sit-data's route watch saw the bearer go silent and removed the rmnet0 default route ("Cellular bearer carries nothing; its default route is removed"), as intended. The modem registered again and the bearer carried traffic again (incoming packets on rmnet0), but the route never came back.The watch only puts the route back when nothing else leads out (
not routed and not others). On the 9a something else always "leads out": the USB gadget's fallback route from20-usb-gadget.network(ConfigureWithoutCarrier=yes, metric 2048) stays configured without a cable and shows up inip -j route show defaultflaggedlinkdown. It also counted againstcellular = routed and not others.other_exits()now leaves default routes on a down link out. A route on a live link (Wi-Fi, a VPN tunnel, USB with a cable) still counts as before.#750 also changes
watch()and readsothers, but it doesn't change howothersis computed, so the two should combine without trouble.Device and build
uname -r): 7.3.0-rc6-omamobile-push1-gcbb1a7eb0a78Checks (no phone needed)
tools/pr-check upstream/mainpassestests/allpasses: not run. CI will show it.tests/packagespasses for the package I touched:packages/omamobile-modem-sit/test/all(scripts parse, unit tests plus RIL against sit-sim, staged layout). There is a new unit test,test_a_route_on_a_down_link_is_no_other_exit.versionbumped, and the new version is in the commit subjectCo-Authored-By:orAssisted-by:trailer, never aSigned-off-by:On the phone
data_network.py, thenomamobile-sit-datarestartedip route del default dev rmnet0 metric 700. Within a second the journal shows "Nothing else leads out; the cellular default route is back", the route is back (next to thelinkdownusb0 route), and HTTPS works. Without the fix the same situation stayed offline for 7 minutes, until a reboot.looks_silentplus a failed ping), only the route coming back. Not tested on other phones, but the change is device-independent.userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1)🤖 Generated with Claude Code