From: Willy Tarreau Date: Mon, 11 May 2026 13:32:34 +0000 (+0200) Subject: BUG/MINOR: mqtt: connack parser returns MQTT_NEED_MORE_DATA on unknown property X-Git-Url: http://www.kaiwu.me/postgresql/commit/static/gitweb.js?a=commitdiff_plain;h=448cc829e50aba94e7f02dc4e9ead85dd5359b20;p=haproxy.git BUG/MINOR: mqtt: connack parser returns MQTT_NEED_MORE_DATA on unknown property In mqtt_parse_connack(), the switch statement's default case for unknown MQTT properties was using 'return 0' which returns MQTT_NEED_MORE_DATA. This is misleading: an unknown property should be treated as an invalid message (MQTT_INVALID_MESSAGE), like other functions do. This branches to the "end" label without touching the preset return value instead. This can be backported if needed. --- diff --git a/src/mqtt.c b/src/mqtt.c index 8e2f04a7e..9ff977ef6 100644 --- a/src/mqtt.c +++ b/src/mqtt.c @@ -1196,7 +1196,7 @@ static int mqtt_parse_connack(struct ist parser, struct mqtt_pkt *mpkt) break; default: - return 0; + goto end; } if (!isttest(props))