Repository navigation
Phase 4D-D1: add safe dynamic DataSet lifecycle - #31
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 584632fc07
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const auto normalized = normalize_reference(data_set_reference); | ||
| const auto owned = owned_data_sets_.contains(normalized); | ||
| if (!owned && policy != MmsDynamicDataSetDeletePolicy::explicit_override) { |
There was a problem hiding this comment.
Reset ownership when the association changes
If the referenced MmsAssociationRuntime is disconnected and connected again, owned_data_sets_ retains names created during the previous association. In particular, reconnecting the same runtime to another endpoint with a same-named static or foreign DataSet makes this check treat it as owned, so the default owned_only path can delete an unrelated DataSet without requiring explicit_override. Scope ownership to an association epoch/endpoint and invalidate it whenever the association changes.
Useful? React with 👍 / 👎.
| const auto encoded = MmsNamedVariableListCodec::encode_define_request_p_data( | ||
| request, association_.negotiated().presentation_context_id); | ||
| const auto exchange = association_.exchange_confirmed( | ||
| encoded, invoke_id, stop_token); |
There was a problem hiding this comment.
Enforce the negotiated MMS PDU size before sending
When maximum_members is raised or members contain long valid identifiers, this encoder can produce a request up to the codec's 1 MiB limit and send it without comparing its MMS PDU length to association_.negotiated().maximum_mms_pdu_size, which commonly defaults to 65,000 bytes and may be lower. Such API-valid creates violate the negotiated association limit and can be rejected or fault the connection; reject or cap the request locally using the negotiated limit before calling exchange_confirmed.
Useful? React with 👍 / 👎.
Scope
Port ARIEC61850 dynamic DataSet support into the C++ stack without touching the parallel Smart Control work.
MMS service parity
Operational runtime
MmsAssociationRuntimeIsolation
No
control/**files or Smart Control sequencing are modified. This PR is intentionally independent of the stacked control work.Validation
Dedicated CTest coverage includes ARIEC C# golden wire vectors, request round trips, malformed/unsafe request rejection, and association-before-mutation guards.
Final head CI is green on Linux GCC, Linux Clang, and Windows MSVC. Security/Evidence is also green with Clang ASan+UBSan and the full libFuzzer corpus smoke.
Acceptance boundary
Physical IED mutation interoperability is not claimed by hosted CI.
DYNAMIC_DATASET_PROFILE.mdrecords the lab acceptance sequence required before calling this live-proven.