Repository navigation
Make MMS server interoperable with current live clients - #66
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 993dae54e1
ℹ️ 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".
| !writer.write_tlv_header( | ||
| asn1::BerClass::context_specific, true, 0, *access_tlv) || | ||
| !writer.write_tlv_header(asn1::BerClass::context_specific, false, 7, 1U) || | ||
| !writer.write_byte(2U) || writer.size() != *required) { |
There was a problem hiding this comment.
Encode object-non-existent with access value 1
When a valid request references a missing optional object, this emits error class access [7] with value 2, which denotes object-access-denied; object-non-existent is value 1 in that MMS error-class enumeration. Clients that inspect the ConfirmedError will therefore treat an absent object as a permissions failure, defeating the intended optional-object discovery behavior.
Useful? React with 👍 / 👎.
| // serviceError.errorClass uses access[7] object-non-existent(2). This is | ||
| // the interoperable outcome for optional IEC 61850 objects such as Cancel: | ||
| // the request was syntactically valid, but the named service object is not | ||
| // present. A RejectPDU would incorrectly classify the request itself as | ||
| // malformed and abort otherwise valid control discovery clients. |
There was a problem hiding this comment.
Keep Reject responses for malformed and unsupported requests
This encoder is not limited to the valid-but-missing case described here: connection_runtime_iedsim.cpp routes malformed_request, unsupported_service, and unsupported_request through the same function via compatibility_error_status(). After this change those requests receive an access-class ConfirmedError and appear to be object lookup failures, rather than receiving the protocol Reject appropriate for malformed or unrecognized requests; route only object_not_found to this encoder and retain Reject encoding for the other statuses.
Useful? React with 👍 / 👎.
Outcome
Completes the runnable read-only/control-capable MMS server phase against the repository's current working clients, while keeping the change isolated on top of #61.
Interoperability fixes
LLN0root type and exact DataSet/RCB structure;ConfirmedErrorfor valid-but-missing optional objects instead of a protocol Reject;Verified evidence
true.Evidence boundary
This is verified software loopback interoperability, not IEC 61850 conformance or physical external IEC 61850 client/ESP32 certification. Check-bit validation remains fail-closed; the explicit test disables unsupported synchro/interlock checks.