]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: mqtt: support mqtt_is_valid and mqtt_field_value converters for MQTTv3.1
authorDhruv Jain <dhruv.jain93@gmail.com>
Mon, 21 Mar 2022 14:34:00 +0000 (20:04 +0530)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 22 Mar 2022 08:25:52 +0000 (09:25 +0100)
commit12957981390ef5c1d60fd6c1004944a0ff28fb1d
tree51abc7c5e3193070f77c8806ade0d34add120fd6
parent76fc07e9a06a50d01506fcf35be15e753fd4f90f
MEDIUM: mqtt: support mqtt_is_valid and mqtt_field_value converters for MQTTv3.1

In MQTTv3.1, protocol name is "MQIsdp" and protocol level is 3. The mqtt
converters(mqtt_is_valid and mqtt_field_value) did not work for clients on
mqttv3.1 because the mqtt_parse_connect() marked the CONNECT message invalid
if either the protocol name is not "MQTT" or the protocol version is other than
v3.1.1 or v5.0. To fix it, we have added the mqttv3.1 protocol name and version
as part of the checks.

This patch fixes the mqtt converters to support mqttv3.1 clients as well (issue #1600).
It must be backported to 2.4.
include/haproxy/mqtt-t.h
reg-tests/converter/mqtt.vtc
src/mqtt.c