mirror of
https://github.com/haproxy/haproxy.git
synced 2026-06-11 01:41:49 -04:00
BUG/MINOR: mqtt: connect parser uses wrong bit field for TOPIC_ALIAS_MAXIMUM
In mqtt_parse_connect(), the MQTT_PROP_TOPIC_ALIAS_MAXIMUM case was checking and setting MQTT_FN_BIT_TOPIC_ALIAS instead of MQTT_FN_BIT_TOPIC_ALIAS_MAXIMUM. This means duplicate detection for Topic-Alias-Maximum property was using the wrong bitmask, and the actual Topic-Alias-Maximum bit was never set, making duplicate detection ineffective for this property. The CONNACK parser already had this correct.
This commit is contained in:
parent
448cc829e5
commit
57878f3b5c
1 changed files with 2 additions and 2 deletions
|
|
@ -789,10 +789,10 @@ static int mqtt_parse_connect(struct ist parser, struct mqtt_pkt *mpkt)
|
|||
break;
|
||||
|
||||
case MQTT_PROP_TOPIC_ALIAS_MAXIMUM:
|
||||
if (fields & MQTT_FN_BIT_TOPIC_ALIAS)
|
||||
if (fields & MQTT_FN_BIT_TOPIC_ALIAS_MAXIMUM)
|
||||
goto end;
|
||||
props = mqtt_read_2byte_int(istnext(props), &mpkt->data.connect.var_hdr.props.topic_alias_maximum);
|
||||
fields |= MQTT_FN_BIT_TOPIC_ALIAS;
|
||||
fields |= MQTT_FN_BIT_TOPIC_ALIAS_MAXIMUM;
|
||||
break;
|
||||
|
||||
case MQTT_PROP_REQUEST_RESPONSE_INFORMATION:
|
||||
|
|
|
|||
Loading…
Reference in a new issue