Skip to content

Fix #3613: Use 0x81 Malformed Packet for invalid DISCONNECT flags - #3642

Open
mustafaabdullahk wants to merge 10 commits into
eclipse-mosquitto:fixesfrom
mustafaabdullahk:fixes/issue-3613
Open

Fix #3613: Use 0x81 Malformed Packet for invalid DISCONNECT flags#3642
mustafaabdullahk wants to merge 10 commits into
eclipse-mosquitto:fixesfrom
mustafaabdullahk:fixes/issue-3613

Conversation

@mustafaabdullahk

Copy link
Copy Markdown

Description of Changes

What:

Modified src/handle_disconnect.c to return MOSQ_ERR_MALFORMED_PACKET instead of MOSQ_ERR_PROTOCOL when invalid reserved bits are detected in the DISCONNECT fixed header.

Why:

This change ensures compliance with the MQTT 5.0 Specification (Section 3.14.1), which states that invalid fixed-header flags for a DISCONNECT packet MUST be classified as a Malformed Packet (Reason Code 0x81).

Prior to this fix, Mosquitto was incorrectly returning 0x82 (Protocol Error), as identified in issue #3613.

@mustafaabdullahk

Copy link
Copy Markdown
Author

Hi everyone, just a gentle ping to see if a maintainer could approve the CI workflow execution for this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants