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.
(cherry picked from commit 12957981390ef5c1d60fd6c1004944a0ff28fb1d)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit f854d113db66cebe9501d368d03126e63f5eaed6)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
3 files changed