diff options
author | Jakub Pawlowski <jpawlowski@google.com> | 2018-12-27 12:46:00 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2019-02-20 06:09:39 +0000 |
commit | 8b0e851d4ed93cc4ea91d3d025faa9d329404369 (patch) | |
tree | 5b2fecd9bfd4df3dbb1518011395b78166ab8bdc /epan/dissectors/packet-btl2cap.c | |
parent | fc0e5d48d5db9f613b52c035cc8c99905d2000b0 (diff) |
Bluetooth: LDAC dissector
Change-Id: I22baf475b3d11dd23fae4c917b27c7aaa13654b4
Reviewed-on: https://code.wireshark.org/review/31799
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-btl2cap.c')
-rw-r--r-- | epan/dissectors/packet-btl2cap.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c index 04afe3a7a7..d18dd29aba 100644 --- a/epan/dissectors/packet-btl2cap.c +++ b/epan/dissectors/packet-btl2cap.c @@ -1243,7 +1243,7 @@ dissect_configrequest(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree_add_item(tree, hf_btl2cap_flags_continuation, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; - if (tvb_reported_length_remaining(tvb, offset) > 0) { + { psm_data_t *psm_data; config_data_t *config_data; wmem_tree_key_t key[6]; @@ -1300,7 +1300,16 @@ dissect_configrequest(tvbuff_t *tvb, int offset, packet_info *pinfo, } else { config_data = NULL; } - offset = dissect_options(tvb, offset, pinfo, tree, length - 4, config_data); + if (config_data != NULL) { + /* Reset config_data that might have been set by an earlier + * Configure Request that failed. + */ + config_data->mode = L2CAP_BASIC_MODE; + config_data->txwindow = 0; + } + if (tvb_reported_length_remaining(tvb, offset) > 0) { + offset = dissect_options(tvb, offset, pinfo, tree, length - 4, config_data); + } } return offset; |