Skip to content

Verify CLAT packet flow with indexed host effects - #24

Closed
pjeweb wants to merge 1 commit into
osb/pr/cellular-uplink-hostfrom
osb/pr/cellular-clat-host
Closed

pjeweb wants to merge 1 commit into
osb/pr/cellular-uplink-hostfrom
osb/pr/cellular-clat-host

Conversation

@pjeweb

@pjeweb pjeweb commented Nov 12, 2026 •

Copy link
Copy Markdown

Why

On an IPv6-only mobile network, the box uses CLAT (a translator that lets IPv4-only software use an IPv6-only mobile network). For that translated path to work, Linux's reverse-path check has to accept its packets while the link's output fence (a firewall rule) still lets traffic leave only through its own device. Packet sizes and address changes also have to be exact. This PR adds that and proves it with real packets in an isolated test network.

What

  • Source routing for CLAT that passes reverse-path validation, while the ready output fence still blocks every other device.
  • The link's MTU (largest packet size) is kept separate from the smaller IPv4 route MTU, so IPv6 still works at the minimum supported size. IPv6 zones are refused instead of silently picking another device.
  • Address and proxy changes are made by kernel index, are acknowledged and are read back. Existing proxy entries are refused before adding.
  • Forwarding is allowed only when each interface has force_forwarding set in both directions. The box never writes global forwarding and never falls back to it.

How: The data path routes each link's packets through CLAT and the carrier's NAT64 (its gateway from IPv6 to the IPv4 internet), and the translator's UDP checksum handling is pinned.

Sits on #23 (native cellular host effects and required sender binding). #25 builds on this PR. Part of the parked cellular stack that starts at #14, which explains the whole stack. It's on hold while the simpler NetworkManager-driven modem path is proven first.

How to verify

Run the tests this PR adds or changes, for example cellular-forwarding-admission.test.ts, cellular-indexed-ip-state.test.ts, cellular-indexed-ip.test.ts, cellular-packet-fence.test.ts, cellular-route-plan.test.ts. They use synthetic modems and fakes, so no hardware is needed. A test in two isolated network namespaces sends traffic through CLAT and NAT64 (the carrier's gateway from IPv6 to the IPv4 internet) at the minimum MTU.

Testing and limits
  • The new tests, lint and type checks, the backend unit suite, a run against a real NetworkManager in an isolated container and the isolated kernel and namespace tests passed when this was last updated.
  • Not tried with a physical modem, SIM or carrier yet.

Risks

None for running boxes yet: the cellular stack is held outside the integration branch, so nothing here reaches a box until the stack is picked up again.


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, OR ceralive-docs PR updates English and Spanish, plus ceralive-website PR if a landing claim changed
  • Started from updated main; branch rebased on latest canonical branch (Rule B)
  • Rule D local-scratch reference check passes for tracked files
  • Tests pass; QA evidence attached or linked

@pjeweb
pjeweb added this pull request to stack #18 November 13, 2026 23:37
@pjeweb pjeweb added stacked Depends on another pull request; review and integrate parents first. superseded Replaced or retired; follow the linked successor instead. labels Nov 16, 2026
@pjeweb

pjeweb commented Nov 16, 2026

Copy link
Copy Markdown
Author

I noticed this proposal has been replaced by #109, #110, #111, #112, #113, #114. Closing this superseded proposal; the branch stays for reference.

@pjeweb pjeweb closed this Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stacked Depends on another pull request; review and integrate parents first. superseded Replaced or retired; follow the linked successor instead.

Development

Successfully merging this pull request may close these issues.

1 participant