Skip to content

Review fixes: change safety, IPv6 renumbering per WAN, RFC 9096 lifetimes, durable state - #96

Merged
Cd1s merged 1 commit into
mainfrom
fix/review-2026-09-26
Sep 26, 2026
Merged

Cd1s merged 1 commit into
mainfrom
fix/review-2026-09-26

Conversation

@Cd1s

@Cd1s Cd1s commented Sep 26, 2026

Copy link
Copy Markdown
Owner

What

A second review of the earlier P0 / change-safety / network / sys work (#9 #10 #11 #12 #17 #22 #38 #21 #35 #36 #39 #46 #8 #5 #7 #16 #20) found and fixed these:

  • Change safety: mr apply --confirm no longer dies halfway when the SSH session drops (the confirm window never started); an apply killed by OOM can be rolled back instead of blocking every later change; confirm / timer / web revert / rollback are serialised by one lock; snapshots are written durably and get unique names; a rollback keeps the current web UI password; two web applies at once cannot both start; a dead apply job no longer answers 409 forever; an apply without a record of the last config counts as high risk.
  • IPv6 (提议:PPPoE 1500 MTU(RFC 4638)与 IPv6 前缀变化不断网(RFC 9096) #46): the same delegated prefix was announced as stale after every reboot (the first dhcpcd event comes before the delegation); records are now per delegating WAN and judged only once that WAN's prefix is back on the bridge. RA lifetimes are capped per RFC 9096 (lease ≤ 45m, ra_interval ≤ 900 s, since dnsmasq keeps lifetimes ≥ 3 × interval).
  • MTU (提议:PPPoE 1500 MTU(RFC 4638)与 IPv6 前缀变化不断网(RFC 9096) #46): switching a WAN from PPPoE (1508 port MTU) to DHCP / static left 1508 until a reboot.
  • Policy routes (按域名选 WAN:双线都有 IPv6 前缀时,源前缀与所选 WAN 不一致 #63): fallback: drop dropped IPv6 from another WAN's prefix; it now matches the policy's own ip6 saddr @pd6_N.
  • State on flash: writeAtomic used a shared temp name and no fsync; one doctor --heal at a time.
  • sys: MGLRU min_ttl_ms without zram too; S3 prefix handled as a directory; archive secret names known to the UI; auto_heal requires a channel; WebDAV passwords may contain spaces.
  • CI: the IPv6 dual-prefix netns check retries once more (it timed out once on a GitHub runner).

Why

The earlier implementations were reviewed again at the owner's request; each change fixes a concrete failure scenario and comes with a regression test.

Verification

  • Private and public tools/ci.sh: ALL CHECKS PASSED (new tests: TestApplyShieldsSignals, TestRollbackInterruptedApply, TestConfirmRevertRace, TestRestoreKeepsPassword, TestApplyJobStartSerialized, TestRiskUnknownChangesIsHigh, TestDeadApplyJobIsFailed, TestSnapshotNames, TestWriteAtomicConcurrent, TestLan6PlanWaitsForPrefix, TestLan6PlanPerWAN, TestWANLinkMTUAfterPPPoE, TestRALeaseCap, TestMGLRUMinTTLAlways, RA capture with the real dnsmasq).
  • AX6000 image built and build/m3/selftest.sh passed (sysupgrade A–E, preinit P1–P8 incl. a power cut inside the confirm window).
  • sync-public.py: no leaks.

https://claude.ai/code/session_01HWeUjo1dmS7gBkCYHrVjCr

…imes, durable state

- apply survives a dropped SSH session (signals shielded); an interrupted apply can be rolled back;
  confirm / timer / revert / rollback share one lock; snapshots are written durably and never
  overwrite each other; a rollback keeps the current web UI password; two web applies at once are
  serialised; a dead apply job no longer blocks the web UI; unknown changes are high risk
- state files: private temp file + fsync before rename; one doctor heal at a time
- stale LAN prefixes are recorded and judged per delegating WAN, and only once that WAN's prefix is
  back on the bridge (no more deprecating the same prefix after every reboot)
- RA prefix lifetimes within RFC 9096 (lease default and ceiling 45m, ra_interval at most 900 s)
- a DHCP / static WAN without mtu puts its port back to 1500 after PPPoE baby jumbo frames
- fallback: drop only catches IPv6 traffic the policy routes (other prefixes use the default WAN)
- MGLRU min_ttl_ms at every boot; S3 prefix as a directory; archive secret names; auto_heal needs
  a channel; a WebDAV password may contain spaces
- CI: the IPv6 dual-prefix check retries (flaked once on a GitHub runner)

Claude-Session: https://claude.ai/code/session_01HWeUjo1dmS7gBkCYHrVjCr
@Cd1s Cd1s mentioned this pull request Sep 26, 2026
52 tasks done
@Cd1s
Cd1s merged commit 1a009b8 into main Sep 26, 2026
2 checks passed
@Cd1s
Cd1s deleted the fix/review-2026-09-26 branch September 26, 2026 07:42
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