Skip to content

Support for MQTT broker to listen on secure and non-secure ports at same time#465

Open
dgarske wants to merge 4 commits intowolfSSL:masterfrom
dgarske:broker_twoport
Open

Support for MQTT broker to listen on secure and non-secure ports at same time#465
dgarske wants to merge 4 commits intowolfSSL:masterfrom
dgarske:broker_twoport

Conversation

@dgarske
Copy link
Contributor

@dgarske dgarske commented Feb 12, 2026

Added support for MQTT broker to listen on secure and non-secure ports at same time.

Expanded MQTT broker edge case testing for retained, graceful disconnect, unsubscribe removes subscription, duplicate subscribe QoS update and session persistence.

@dgarske dgarske requested a review from embhorn February 12, 2026 19:02
@dgarske dgarske self-assigned this Feb 12, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds dual-listener support to the wolfMQTT broker so it can accept both plain MQTT and MQTT-over-TLS connections concurrently, with new build/configuration switches to optionally disable the plain-text listener.

Changes:

  • Add separate TLS listener socket/port to broker state and accept loop, enabling simultaneous plain + TLS listening.
  • Add --disable-broker-insecure (autotools) / WOLFMQTT_BROKER_INSECURE (CMake option) to compile out the plain-text listener (TLS-only builds).
  • Update broker CLI/test tooling and CI matrix to support/validate dual-port and TLS-only modes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
wolfmqtt/mqtt_broker.h Adds insecure feature toggle + TLS listener fields to broker struct.
src/mqtt_broker.c Implements dual listener sockets/ports, TLS-only option behavior, CLI flag -s, and some socket validation.
scripts/broker.test Updates test harness to handle TLS-only builds and adds dual-port integration tests.
configure.ac Adds --disable-broker-insecure configure flag that defines WOLFMQTT_BROKER_NO_INSECURE.
CMakeLists.txt Adds WOLFMQTT_BROKER_INSECURE option and defines WOLFMQTT_BROKER_NO_INSECURE when disabled.
.github/workflows/broker-check.yml Adds CI job for “TLS-only (no insecure)” configuration.

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

…ect, unsubscribe removes subscription, duplicate subscribe QoS update and session persistence.
Copy link

Copilot AI left a comment

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.


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

@dgarske dgarske assigned wolfSSL-Bot and embhorn and unassigned dgarske and embhorn Feb 16, 2026
Copy link
Member

@embhorn embhorn left a comment

Choose a reason for hiding this comment

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

Great! Tested broker on RPi connecting clients from Linux (TLS) and Win (insecure)

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.

3 participants