Harden RSSI connection negotiation - #1457
Merged
Merged
Conversation
This was referenced Jul 7, 2026
bengineerd
marked this pull request as ready for review
July 13, 2026 18:17
ruck314
changed the base branch from
rssi-regression-foundation
to
pre-release
August 24, 2026 15:18
ruck314
force-pushed
the
rssi-conn-fsm-fixes
branch
from
August 24, 2026 15:20
df2ee1a to
16b6fd1
Compare
ruck314
approved these changes
Aug 24, 2026
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.
Description
Harden RSSI connection parameter negotiation and retry timeout handling.
RssiConnFsmpreviously converted peer-providedmaxOutsSegandmaxSegSizevalues into integer window/buffer state before checking that those values were legal. A peer SYN or SYN+ACK with zero outstanding segments, an undersized segment size, or zero timeout fields could therefore produce illegal local state or simulation range errors instead of following the normal RSSI negotiation/reject path.The retry wait states also incremented
timeoutCntrbefore testing for the retransmission timeout boundary. Since the counter range is constrained to0 .. RETRANS_TOUT_G * SAMPLES_PER_TIME_C, the exact timeout edge could drive the next-state value past the declared range.This changes
RssiConnFsmto validate peer parameters before accepting or negotiating them, clamp negotiated window and buffer sizes to legal local implementation ranges, and saturate the retry timeout counter at the timeout threshold. The connection FSM regression is ungated now that these cases pass.Details
This fix is necessary because connection parameters are protocol inputs. The FSM should either accept a legal peer proposal, propose local parameters from the server side, or reject/reset from the client side. It should not rely on downstream integer range constraints to catch illegal protocol values.
This has usually worked until now because normal peers advertise nonzero window and timeout fields and segment sizes that match the local configuration. The failure mode appears with directed tests that inject out-of-range SYN/SYN+ACK parameters, or with very small timeout generics where the retry counter reaches its declared boundary exactly.
The relevant protocol intent is:
The Rogue RSSI controller follows the same broad model:
Controller.cpp;Controller.cpp;Controller.cpp;Controller.cpp.So this PR keeps the RTL behavior aligned with the intended RSSI connection flow while making the hardware-specific integer and counter bounds explicit.
Validation: