Repository navigation
net: a stopped PPPoE service always gets its PADT out (reboot with a slow ISP) - #177
Merged
Merged
Conversation
Cd1s
force-pushed
the
fix/pppoe-padt-on-stop
branch
from
October 25, 2026 20:39
066b849 to
59180b9
Compare
`reboot` stops mr-pppoe.* first, but supervise-daemon declares the service stopped after 5 s while pppd still waits for the ISP's LCP Terminate-Ack (2 requests x 3 s) before it sends the PADT; the reboot goes on and the PADT is lost whenever the ISP is slow or silent. The ISP then keeps counting the old session (AIS: the next dial lands in a walled garden). - pppoe-dial starts pppd with lcp-max-terminate 1: the PADT leaves at once when the ISP answers, after 3 s when it does not. - mr-pppoe: retry="SIGTERM/10", supervise-daemon waits for pppd to exit. - Test: TestPPPoEStopLeavesTimeForPADT (the two numbers stay consistent); lab scenario 15-pppoe-reboot-padt (two sessions, a responsive and a silent ISP: LCP Terminate + PADT for every session, mr-pppoe.* stopped before the firewall unloads). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Cd1s
force-pushed
the
fix/pppoe-padt-on-stop
branch
from
October 25, 2026 20:41
59180b9 to
3f62ff2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #176
Based on #175 (the lab ISP simulator additions it uses: wire log,
--echo); #175 goes first, then this one.What
rootfs/usr/libexec/mr/pppoe-dial: pppd starts withlcp-max-terminate 1. On SIGTERM it sends one LCP Terminate-Request and sends the PADT as soon as the ISP answers, or afterlcp-restart(3 s) when it does not. The default (2 requests) needed 6 s.rootfs/etc/init.d/mr-pppoe:retry="SIGTERM/10", so supervise-daemon waits for pppd to exit instead of declaring the service stopped after 5 s.docs/modules/net.md(what a stop / restart / reboot does to the PPPoE sessions, and what cannot send a PADT).15-pppoe-reboot-padt;TestPPPoEStopLeavesTimeForPADTkeeps the two numbers consistent.Why
Investigation of the reboot path (details in #176):
reboot→ busybox init →/sbin/openrc shutdown.mr-pppoe.*is stopped first, before the firewall is unloaded or any link is touched (mr-networkhas no stop action; serial console order:Stopping mr-pppoe.wan…Unloading firewall…Unmounting). The AX6000 image builds on the same Alpine inittab / OpenRC (build/m3/build-rootfs.shonly drops the tty lines);kexecis onlysysupgrade, which stopsmr-pppoe.*itself first; nothing in the repo reboots with-f.reboot.rc-service mr-pppoe.wan stopreturned after exactly 5 s (supervise-daemon's default) while pppd was still waiting (Terminate-Requests at 0 s and 3 s, PADT at 6 s, observed with pppd still alive after the "stopped" service). In a reboot the system was gone before the PADT. The ISP keeps counting the old session, which is how a reboot turns into walled-garden sessions at an ISP with a concurrent limit. A guard redial (rc-service … restart) has the same stop path.Verification
Lab (id 8), two sessions on one port, ISP wire log (
pppoe-watch.py):Before (this PR's parent):
not ok 8 - B: wan's session ended with PADT although the ISP never answered; the ISP saw, after the reboot command with its pppd frozen,After: 10/10 ok
cd mr && go test ./...andsh tools/ci.sh:ALL CHECKS PASSED.🤖 Generated with Claude Code