feat(gtpv2c): add finite S2b F-TEID receive policy - #694
Draft
VerifiedOrganic wants to merge 3 commits into
Draft
Conversation
Signed-off-by: VerifiedOrganic <verifiedorganic@sent.com>
Signed-off-by: VerifiedOrganic <verifiedorganic@sent.com>
Signed-off-by: VerifiedOrganic <verifiedorganic@sent.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
Implements only the reusable SDK primitive in Refs #687.
S2bCreateSessionResponseReceivePolicystate. The strict default remains control{32}and user-plane{33}; callers may independently opt into control{32, 7}and user-plane{33, 5}.decode_create_session_response_summary_with_receive_policyentry point. Existing structural, typed, and no-policy projection APIs remain strict.Exact revision
9b85ae1f8a98f5fe9f9f77225f72e5364840b5b14cb0806bd910c32a3693dfa4f3237360c0f4385ea27449e7c71c7ea85f95f810b6ae02aa583d3b779006ac04e38060bf8036cf74c5a5f45ead6de75bmain/feat/687-s2b-fteid-receive-policy-wm-20260815API and compatibility contract
The policy has private role state, no numeric or collection constructor, strict
Default, and consuming named opt-in methods. It is copied into one decode. The policy applies only to accepted S2b Create Session Response PGW control and user-plane receive roles. It cannot broaden other GTPv2-C procedures or profiles, and no general policy-aware message decoder was added that could lose the policy before projection.Endpoint selection retains ProcedureAware first-wins behavior per singleton key. A later duplicate cannot repair an invalid retained value; distinct table-defined nested instances remain independently eligible, and the first authoritative Bearer Context cannot be bypassed. Existing mismatch variants and static error strings remain stable.
Changed files
CHANGELOG.mdcrates/opc-proto-gtpv2c/CONFORMANCE.mdcrates/opc-proto-gtpv2c/README.mdcrates/opc-proto-gtpv2c/src/lib.rscrates/opc-proto-gtpv2c/src/s2b.rscrates/opc-proto-gtpv2c/tests/s2b_profile_builders.rscrates/opc-proto-gtpv2c/tests/s2b_typed.rsdocs/implementation-status.mdRED and mutation evidence
Debug; commita27449e7replaces it with bounded, value-free custom formatting and adds sentinel defenses.Local verification
The exact consolidated gate was rerun from its first command after recovery and completed through the shared
opc-heavylock with exit 0, using repository-default Cargo parallelism and no target/cache/wrapper/job overrides.Affected package and documentation:
cargo fmt --all --checkgit diff --checkcargo clippy --locked -p opc-proto-gtpv2c --all-targets --all-features -- -D warningscargo test --locked -p opc-proto-gtpv2c --all-features(46 unit tests, 44 typed S2b tests, 13 builder tests, and all other integration/doc tests passed)RUSTDOCFLAGS='-D warnings' cargo doc --locked -p opc-proto-gtpv2c --all-features --no-depsFull repository gates prescribed by
CONTRIBUTING.md:cargo clippy --locked -p opc-persist --all-targets --no-default-features -- -D warningscargo test --locked -p opc-persist --no-runopc-persistsecurity targets passed (12 + 6 + 7 + 13 tests).cargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspace --all-features --quiet -- --test-threads=4real_three_and_five_process_openraft_sqlite_stop_restart_foundation, in 80.00s./usr/local/go/bin/go vet ./...and/usr/local/go/bin/go test ./...passed with Go 1.26.6.kubectl kustomize operators/sdk-reference-operator/config/defaultpassed.Hosted exact-head status
All four hosted workflows for exact head
a27449e7c71c7ea85f95f810b6ae02aa583d3b77reached terminal success. The complete 44-check set is green: 43 checks passed and the scheduled-onlyScheduled fuzzjob was skipped. This includes the final dependentRust workspaceaggregate.Fresh independent exact-head review
A bounded read-only adversarial review independently pinned base
9b85ae1f/ tree4cb0806band heada27449e7/ tree9006ac04and returned no actionable findings. It specifically rechecked finite immutable exact-role state, strict defaults and legacy overloads, the shared first-retained resolver and no-repair behavior, typed projection alignment, recursive strict builder confinement, static/value-free errors and customDebug, test defenses, and the generic downstream boundary.Privacy treatment
Typed mismatch errors remain stable, static, and value-free. Endpoint
Debugsurfaces expose only bounded role/presence metadata. Accepted and rejected response summaries and both response builders use custom redactedDebugimplementations, so TEIDs, IP addresses, response identifiers, and private-data payloads are not formatted. Tests exercise sentinel endpoint, identifier, address, and private-data values without including them in diagnostics.Downstream boundary and exclusions
This is a generic SDK primitive for downstream ePDG #132. It does not edit ePDG, choose when compatibility is enabled, or add product policy. It does not accept arbitrary interface types, alter strict builder emission, add a mutable policy path, add a permissive projection overload, change unrelated procedures/profiles, add dependencies, or touch CRC/kernel state.
Checklist
cargo fmt, warning-denied affected/workspace Clippy, focused/full Rust tests, docs, Go vet/tests, Kustomize).VerifiedOrganic <verifiedorganic@sent.com>and are signed off.