Skip to content

fix: stop forwarding for a force-terminated PPPoE session and drop frames from other sessions - #230

Merged
w180112 merged 1 commit into
masterfrom
fix/exit-ppp-close-dp-gate
Oct 9, 2026
Merged

w180112 merged 1 commit into
masterfrom
fix/exit-ppp-close-dp-gate

Conversation

@w180112

@w180112 w180112 commented Oct 9, 2026

Copy link
Copy Markdown
Member

Summary

  • exit_ppp now closes the data-plane gate and clears session_id: a force-disable after a link-down used to leave the gate open, so LAN traffic kept being encapsulated into the ended session with source 0.0.0.0.
  • Force-disable skips slots with no config so they stay NOT_CONFIGURED.
  • ppp_process drops PADT and session frames (LCP/IPCP/IPv6) whose session id is not the current one, and all of them when there is no session — so a stale session's PADT or echo can no longer tear down or keep alive the current session.
  • DisconnectHsi force-all no longer also queues a plain DISABLE and records the desire snapshot in its own branch.

Testing

  • make test: 2408/2408 (new test_fastrg_force_terminate_hsi, test_ppp_process, and exit_ppp assertions)
  • make all
  • e2e: 198/198, with every node stop ending cleanly; during the e2e the new check dropped 388 frames carrying older session ids that the BRAS still sent.

🤖 Generated with Claude Code

…ames from other sessions

exit_ppp() now closes the data-plane gate (dp_start_bool) and clears
session_id. Previously, FORCE_DISABLE paths (link-down timeout, gRPC
force) that don't go through PPP_bye left dp_start_bool open after a
link-down, so the node kept encapsulating into the already-ended
session on WAN/LAN forwarding.

fastrg_force_terminate_hsi() now skips slots whose phase is
NOT_CONFIGURED, so unconfigured subscribers are left alone instead of
being pushed to END_PHASE and later reported as Kafka DISCONNECTED for
a user that was never configured.

ppp_process() now drops PADT and session-bearing frames (LCP, IPCP,
IPv6) whose PPPoE session id does not match the ccb's current session,
and drops all such frames outright when the ccb has no session at all.
This prevents another session's packets from resetting echo-miss
counters, tearing down the session early, or being handed to DHCPv6.

DisconnectHsi's force-all branch no longer also queues a plain DISABLE
command after the FORCE_DISABLE command succeeds, and now records the
desire snapshot itself when SDN is offline, matching the single-user
force branch's behavior.

Unit tests added for all of the above (no existing assertions
changed): exit_ppp clears dp_start_bool, a new
test_fastrg_force_terminate_hsi, and a new test_ppp_process covering
session-id mismatch for IPv6/LCP/PADT and the no-session case.

Build and gate results (unit test, e2e) will be reported in the PR
after rebase.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@w180112
w180112 merged commit 768895d into master Oct 9, 2026
9 checks passed
@w180112
w180112 deleted the fix/exit-ppp-close-dp-gate branch October 9, 2026 15:40
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