Skip to content

Complete #46: RFC 9096 renumbering wired in; tests, real-tool CI, docs - #75

Merged
Cd1s merged 1 commit into
mainfrom
fix/pppoe-mtu-renumber-complete
Sep 26, 2026
Merged

Cd1s merged 1 commit into
mainfrom
fix/pppoe-mtu-renumber-complete

Conversation

@Cd1s

@Cd1s Cd1s commented Sep 26, 2026

Copy link
Copy Markdown
Owner

What

  • hookDhcpcd now runs lan6Renumber on every dhcpcd event (WAN and LAN-bridge events). The first version merged in PPPoE RFC 4638 MTU and IPv6 renumbering recovery (#46) #73 never called it, so a prefix lost across a reboot was never deprecated.
  • raLeaseSecs: a plain-number lease is seconds (was treated as the 2 h default).
  • Unit tests: TestWANLinkMTUs, TestWANLinkMTUHome, TestLan6Addrs, TestLan6Plan, TestRALeaseSecs.
  • CI (tools/ci.d/net.sh step 4): real kernel link MTUs, and an end-to-end RFC 9096 check with the real mr hook dhcpcd, a real dnsmasq and a raw-ICMPv6 client.
  • Docs: docs/modules/net.md (mtu 1500 / RFC 4638, renumbering after a reboot), skill cheat-sheet.

Why

#46 was closed by #73 with the RFC 9096 half dead code and no tests.

Verification

  • sh tools/ci.sh on the build host: ALL CHECKS PASSED — net: PPPoE port 1508, DHCP VLAN 1500; RA client: old prefix valid 1790 preferred 0; current preferred 1790.
  • pppd 2.5.3 source checked: the pppoe plugin caps mru/mtu at link MTU − 8, sends PPP-Max-Payload only when both exceed 1492, falls back to 1492 otherwise.

Closes #46

https://claude.ai/code/session_01HWeUjo1dmS7gBkCYHrVjCr

…, real-tool CI, docs

The first version left lan6Renumber uncalled (a prefix that did not come back after a reboot was
never announced as stale) and shipped no tests or docs.

- hooks.go: every dhcpcd event (a WAN's, and the LAN bridge's that gets the delegated prefix) runs
  lan6Renumber: records the RA bridges' prefixes and, in the first event after a reboot, puts the ones
  that did not come back on the bridge with preferred lifetime 10 s so dnsmasq deprecates them.
- raLeaseSecs: a lease in plain seconds counts as seconds.
- Unit tests for the link MTUs, the VLAN ordering in network.sh, lan6Addrs, lan6Plan, raLeaseSecs.
- CI: the rendered link commands in a real kernel (PPPoE port 1508, DHCP VLAN 1500); after a
  "reboot" the real `mr hook dhcpcd` restores the lost prefix and a real dnsmasq advertises it to a
  client with preferred lifetime 0 while the current prefix stays preferred.
- docs/modules/net.md: mtu 1500 (RFC 4638) and renumbering after a reboot.

Closes #46

Claude-Session: https://claude.ai/code/session_01HWeUjo1dmS7gBkCYHrVjCr
@Cd1s
Cd1s merged commit 344cb9d into main Sep 26, 2026
2 checks passed
@Cd1s
Cd1s deleted the fix/pppoe-mtu-renumber-complete branch September 26, 2026 00:44
@Cd1s Cd1s mentioned this pull request Sep 26, 2026
52 tasks done
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.

提议:PPPoE 1500 MTU(RFC 4638)与 IPv6 前缀变化不断网(RFC 9096)

1 participant