]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: mqtt: connack parser returns MQTT_NEED_MORE_DATA on unknown property
authorWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 13:32:34 +0000 (15:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 11 May 2026 14:04:19 +0000 (16:04 +0200)
commit448cc829e50aba94e7f02dc4e9ead85dd5359b20
treeac9010af0816f4c32720d4d60a86958e13722683
parent128c654aac423940c54f1aa7aaeaa5e8692c975f
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