Repository navigation
fix: stop forwarding for a force-terminated PPPoE session and drop frames from other sessions - #230
Merged
Merged
Conversation
…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>
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.
Summary
exit_pppnow closes the data-plane gate and clearssession_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.NOT_CONFIGURED.ppp_processdrops 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.DisconnectHsiforce-all no longer also queues a plain DISABLE and records the desire snapshot in its own branch.Testing
make test: 2408/2408 (newtest_fastrg_force_terminate_hsi,test_ppp_process, andexit_pppassertions)make all🤖 Generated with Claude Code