Skip to content

Fenrir fixes#554

Merged
philljj merged 11 commits into
wolfSSL:masterfrom
embhorn:fenrir_fixes
Jul 2, 2026
Merged

Fenrir fixes#554
philljj merged 11 commits into
wolfSSL:masterfrom
embhorn:fenrir_fixes

Conversation

@embhorn

@embhorn embhorn commented Jun 18, 2026

Copy link
Copy Markdown
Member
  • Fix f-3626: v5 MqttClient_Publish returns invalid success
  • Fix f-6222: broker sub queue hardening
  • Fix f-3393: Broker auth when only one of auth_user/auth_pass
  • Fix f-6047: SN_Client_Unsubscribe
  • Fix f-6217: NULL msg_cb silently discards incoming PUBLISH
  • Fix f-3391: cover PUBREC/REL ack filter in MqttClient_HandlePacket
  • Fix f-3392: tests for QoS ack selector in MqttClient_HandlePacket
  • Fix f-6223: tests for MqttClient_Connect refused-CONNACK
  • Fix f-6487: tests for refused-CONNACK v5 property gate

@embhorn embhorn self-assigned this Jun 18, 2026
Copilot AI review requested due to automatic review settings June 18, 2026 20:48

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 fixes issue f-3626 by ensuring MQTT v5 broker-side rejections of QoS>0 publishes are surfaced to callers (instead of incorrectly returning success), aligning the client’s publish behavior with how other v5 “ACK-but-rejected” flows are reported.

Changes:

  • Add a new return code MQTT_CODE_ERROR_PUBLISH_REJECTED for v5 QoS>0 PUBLISH rejections signaled via PUBACK/PUBREC/PUBCOMP reason codes (>= 0x80).
  • Update client publish handling to (a) stop QoS2 on PUBREC rejection (no illegal PUBREL) and (b) post-check PUBACK/PUBCOMP reason codes after the wait.
  • Add unit tests covering QoS1/QoS2 acceptance vs rejection cases (and a v3.1.1 guard).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
wolfmqtt/mqtt_types.h Introduces the new MQTT_CODE_ERROR_PUBLISH_REJECTED return code.
wolfmqtt/mqtt_client.h Updates public API docs to mention the new publish rejection code (and adds a note about the write-only path).
src/mqtt_client.c Implements publish rejection detection for v5 PUBACK/PUBREC/PUBCOMP and adds string mapping for the new code.
tests/test_mqtt_client.c Adds regression tests validating correct return codes and QoS2 handshake behavior on v5 rejections.
ChangeLog.md Documents the behavior change and its implications for callers, including MT/write-only caveats.

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

Comment thread wolfmqtt/mqtt_client.h Outdated
@embhorn embhorn marked this pull request as ready for review July 1, 2026 19:39

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 10 out of 10 changed files in this pull request and generated 2 comments.

Comment thread wolfmqtt/mqtt_client.h
Comment thread tests/test_mqtt_sn_client.c

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #554

Scan targets checked: wolfmqtt-bugs, wolfmqtt-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

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 10 out of 10 changed files in this pull request and generated no new comments.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot 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.

Fenrir Automated Review — PR #554

Scan targets checked: wolfmqtt-bugs, wolfmqtt-src

No new issues found in the changed files. ✅

@embhorn embhorn assigned wolfSSL-Bot and unassigned embhorn Jul 2, 2026
@embhorn embhorn requested a review from philljj July 2, 2026 12:51
@philljj philljj merged commit 0144433 into wolfSSL:master Jul 2, 2026
47 checks passed
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.

5 participants