Fix CHUNK_SEND_ACK to return UNSUPPORTED_REQUEST - #3715
Open
Tali-Kalev wants to merge 3 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the SPDM responder’s CHUNK send/ack handling to align with the SPDM specification by returning SPDM_ERROR_CODE_UNSUPPORTED_REQUEST when CHUNK_CAP was not negotiated (fixing #3711).
Changes:
- Change the error code returned when
CHUNK_CAPis not negotiated fromSPDM_ERROR_CODE_UNEXPECTED_REQUESTtoSPDM_ERROR_CODE_UNSUPPORTED_REQUEST.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
library/spdm_responder_lib/libspdm_rsp_chunk_send_ack.c:49
- This change alters the responder behavior when CHUNK_CAP is not negotiated (now ERROR(UNSUPPORTED_REQUEST) with error_data=SPDM_CHUNK_SEND). The existing unit test
unit_test/test_spdm_responder/chunk_send_ack.ccase1 still asserts UNEXPECTED_REQUEST/0 and will need to be updated (or a new assertion added) to match the new expected error code/data, otherwise CI will likely fail.
return libspdm_generate_error_response(
spdm_context,
SPDM_ERROR_CODE_UNSUPPORTED_REQUEST, SPDM_CHUNK_SEND,
response_size, response);
When CHUNK_CAP capability is not negotiated, CHUNK_SEND_ACK should return SPDM_ERROR_CODE_UNSUPPORTED_REQUEST instead of SPDM_ERROR_CODE_UNEXPECTED_REQUEST. Fixes DMTF#3711 Assisted-by: GitHub Copilot:claude-sonnet-4-5 Signed-off-by: Kalev, Tali <tali.kalev@intel.com>
Assisted-by: GitHub Copilot:claude-sonnet-4-5 Signed-off-by: Tali-Kalev <tali.kalev@intel.com>
Test case 1 now expects SPDM_ERROR_CODE_UNSUPPORTED_REQUEST with error_data SPDM_CHUNK_SEND when CHUNK_CAP is not negotiated, matching the corrected behavior in libspdm_rsp_chunk_send_ack.c. Assisted-by: GitHub Copilot:claude-sonnet-4-5 Signed-off-by: Kalev, Tali <tali.kalev@intel.com>
Tali-Kalev
force-pushed
the
fix-chunk-send-ack-error-code
branch
from
July 28, 2026 08:03
6b8e971 to
3b3bd69
Compare
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.
When CHUNK_CAP capability is not negotiated, CHUNK_SEND_ACK should return SPDM_ERROR_CODE_UNSUPPORTED_REQUEST instead of SPDM_ERROR_CODE_UNEXPECTED_REQUEST.
Fixes #3711