From 448cc829e50aba94e7f02dc4e9ead85dd5359b20 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 11 May 2026 15:32:34 +0200 Subject: [PATCH] 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. --- src/mqtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- 2.47.3