Skip to content

Fix CHUNK_SEND_ACK to return UNSUPPORTED_REQUEST - #3715

Open
Tali-Kalev wants to merge 3 commits into
DMTF:mainfrom
Tali-Kalev:fix-chunk-send-ack-error-code
Open

Fix CHUNK_SEND_ACK to return UNSUPPORTED_REQUEST#3715
Tali-Kalev wants to merge 3 commits into
DMTF:mainfrom
Tali-Kalev:fix-chunk-send-ack-error-code

Conversation

@Tali-Kalev

Copy link
Copy Markdown

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

Copilot AI review requested due to automatic review settings July 28, 2026 07:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_CAP is not negotiated from SPDM_ERROR_CODE_UNEXPECTED_REQUEST to SPDM_ERROR_CODE_UNSUPPORTED_REQUEST.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread library/spdm_responder_lib/libspdm_rsp_chunk_send_ack.c Outdated
Copilot AI review requested due to automatic review settings July 28, 2026 07:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.c case1 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);
Copilot AI review requested due to automatic review settings July 28, 2026 07:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

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
Tali-Kalev force-pushed the fix-chunk-send-ack-error-code branch from 6b8e971 to 3b3bd69 Compare July 28, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants