Skip to content

Honor explicit IP family requests in NetworkManager profiles - #33

Open
pjeweb wants to merge 2 commits into
CERALIVE:mainfrom
openstreambox:osb/pr/opt-in-ip-family
Open

pjeweb wants to merge 2 commits into
CERALIVE:mainfrom
openstreambox:osb/pr/opt-in-ip-family

Conversation

@pjeweb

@pjeweb pjeweb commented Nov 14, 2026 •

Copy link
Copy Markdown

Affected repo & language: modem-stack · TypeScript

What

A cellular policy already carries an IP family, but the NetworkManager profile writer ignores it, so a caller asking for IPv6-only service silently gets the default. This makes the requested family reach the saved profile.

  • ipv4, ipv6 and ipv4v6 now set the saved profile's IP methods.
  • A known mismatch on readback stays pending until it converges; a missing family readback doesn't cause repeated updates.
  • The required 1.x policy field and its ipv4v6 default stay compatible, and low-level profile calls can still leave the methods alone by omitting the family.

Why

IPv6-only carriers need the modem to come up IPv6-only, and that request currently goes nowhere. Honouring it is the first step; full support still needs IPv6-aware consumers and CLAT for IPv4 hotspot devices. CeraUI forces IPv4 today with ipv6.method ignore, and those profiles read back here as unknown.

The existing NetworkManager port writes both methods together and reads the saved settings back. Saving a profile doesn't reconnect an active modem.

Your call: for an ipv4 request, should ipv6.method be ignore to match CeraUI, or stay disabled to switch IPv6 off on the interface?

How to verify

Commands and validation
  • bun test --max-concurrency 1 control/src/backend/nm-ip-family.test.ts cli/src/policy-family.test.ts: 14 pass, 0 fail. Covers create/update mappings, unchanged low-level argv on omission, unknown readback without drift, known mismatch convergence, and saved settings changed independently of the request. The fake has its own writer and readback parser.
  • dbus-run-session -- bun test --max-concurrency 1: 1,506 pass, 0 fail, including FM350 coverage.
  • bun run lint and bun run typecheck: pass.
  • bun run --cwd control verify:tarball: pass, 412 entries.
  • bun run --cwd control verify:consumers: pass with Node 26.

Tests ran with Bun 1.4.3. No live modem or SIM test is claimed.

Risks

Behavior changes and limits
Request ipv4.method ipv6.method
ipv4 auto disabled
ipv6 disabled auto
ipv4v6 auto auto
  • Existing policies now have their family honored on profile creation and on updates needed for APN, roaming, or a known family mismatch. The default remains ipv4v6; CLI JSON omission converts to that default. Low-level port omission still writes no methods.
  • Consumers without family readback do not enforce family-only changes on existing profiles. They can supply GsmProfile.ipFamily as appliedIpFamily to enable known-mismatch reconciliation. Unknown readback does not prove the family was applied.
  • Only the three method pairs above yield a family. auto/ignore, manual settings, and disabled/disabled stay unknown.
  • Receipt reasons include a family suffix. Consumers should use receipt status rather than parse the reason text.
  • ipv6.method disabled requires NetworkManager 1.20 or newer. Dual stack requests both automatic methods without requiring both to succeed.
  • Saved settings do not prove carrier-granted addresses. APN ownership, credentials, routes, DNS, may-fail, activation policy and ModemManager bearer operations are unchanged. FM350-GL support is retained.

Rollback: revert the profile-family changes.


Checklist

  • Docs updated if behavior or structure changed (Rule A: AGENTS.md within budget, README, docs/, versions.yaml)
  • User docs (Rule G): no user-visible change in CeraUI
  • Started from updated main; canonical main remains the branch base (Rule B)
  • Rule D local-scratch reference check passes for tracked changes
  • Tests pass; QA evidence included above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant