mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-27 03:33:36 -04:00
BUG/MINOR: mqtt: connack parser uses wrong bit for SUBSCRIPTION_IDENTIFIERS_AVAILABLE
In mqtt_parse_connack(), the MQTT_PROP_SUBSCRIPTION_IDENTIFIERS_AVAILABLE case was checking and setting MQTT_FN_BIT_SUBSCRIPTION_IDENTIFIER instead of MQTT_FN_BIT_SUBSCRIPTION_IDENTIFIERS_AVAILABLE, due to a copy-paste mistake. This can be backported where needed.
This commit is contained in:
parent
57878f3b5c
commit
e2ab156fa2
1 changed files with 2 additions and 2 deletions
|
|
@ -1127,13 +1127,13 @@ static int mqtt_parse_connack(struct ist parser, struct mqtt_pkt *mpkt)
|
|||
break;
|
||||
|
||||
case MQTT_PROP_SUBSCRIPTION_IDENTIFIERS_AVAILABLE:
|
||||
if (fields & MQTT_FN_BIT_SUBSCRIPTION_IDENTIFIER)
|
||||
if (fields & MQTT_FN_BIT_SUBSCRIPTION_IDENTIFIERS_AVAILABLE)
|
||||
goto end;
|
||||
props = mqtt_read_1byte_int(istnext(props), &mpkt->data.connack.var_hdr.props.subscription_identifiers_available);
|
||||
/* can have only 2 values: 0 or 1 */
|
||||
if (mpkt->data.connack.var_hdr.props.subscription_identifiers_available > 1)
|
||||
goto end;
|
||||
fields |= MQTT_FN_BIT_SUBSCRIPTION_IDENTIFIER;
|
||||
fields |= MQTT_FN_BIT_SUBSCRIPTION_IDENTIFIERS_AVAILABLE;
|
||||
break;
|
||||
|
||||
case MQTT_PROP_SHARED_SUBSRIPTION_AVAILABLE:
|
||||
|
|
|
|||
Loading…
Reference in a new issue