Skip to content

Control packet length check for PCIe_VDM #22

@gilbert0225

Description

@gilbert0225

Via 'Management Component Transport Protocol (MCTP) PCIe VDM Transport Binding Specification', PCIe VDM Header only manger the Length with WORD aligned size.

So, following len check will be failed always, for the MCTP control packets which are delivered thru PCIe VDM

  • if (len != sizeof(struct mctp_ctrl_cmd_set_endpoint_id_req)) {
  • if (len != sizeof(struct mctp_ctrl_msg_hdr)) {
  • if (len != sizeof(struct mctp_ctrl_cmd_get_version_req)) {
  • if (len != sizeof(struct mctp_ctrl_msg_hdr)) {

How about to change the len check as below ?

  • if (len < sizeof(struct mctp_ctrl_cmd_set_endpoint_id_req)) {
  • if (len < sizeof(struct mctp_ctrl_msg_hdr)) {
  • if (len < sizeof(struct mctp_ctrl_cmd_get_version_req)) {
  • if (len < sizeof(struct mctp_ctrl_msg_hdr)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions