aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2020-09-14 09:10:43 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2020-09-14 18:54:31 +0000
commit5fbd3d5a5f10659a4c96d9f1f8cee8eb1b0ade20 (patch)
tree89afb0da0709dc68adf5a1736c6dae83d07a5977
parent8069eee57109eb1680fe340a94931d38f56ef854 (diff)
downloadwireshark-5fbd3d5a5f10659a4c96d9f1f8cee8eb1b0ade20.tar.gz
wireshark-5fbd3d5a5f10659a4c96d9f1f8cee8eb1b0ade20.tar.bz2
wireshark-5fbd3d5a5f10659a4c96d9f1f8cee8eb1b0ade20.zip
GQUIC: fix dissection of ACK frame
(cherry picked from commit 25d10e68a89633de80ea00406ab7683fab8795f6)
-rw-r--r--epan/dissectors/packet-gquic.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/epan/dissectors/packet-gquic.c b/epan/dissectors/packet-gquic.c
index e65463df1a..581499d7d0 100644
--- a/epan/dissectors/packet-gquic.c
+++ b/epan/dissectors/packet-gquic.c
@@ -1296,11 +1296,7 @@ static gboolean is_gquic_unencrypt(tvbuff_t *tvb, packet_info *pinfo, guint offs
/* First Ack Block Length */
offset += len_missing_packet;
if(num_blocks){
- /* Gap to next block */
- offset += 1;
-
- num_blocks -= 1;
- offset += (num_blocks - 1)*len_missing_packet;
+ offset += (num_blocks)*(1 + len_missing_packet);
}
/* Timestamp */
@@ -1920,19 +1916,16 @@ dissect_gquic_frame_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *gquic_tr
proto_tree_add_item(ft_tree, hf_gquic_frame_type_ack_first_ack_block_length, tvb, offset, len_missing_packet, gquic_info->encoding);
offset += len_missing_packet;
- if(num_blocks){
+ while(num_blocks){
/* Gap to next block */
proto_tree_add_item(ft_tree, hf_gquic_frame_type_ack_gap_to_next_block, tvb, offset, 1, ENC_NA);
offset += 1;
- num_blocks -= 1;
- while(num_blocks){
- /* Ack Block Length */
- proto_tree_add_item(ft_tree, hf_gquic_frame_type_ack_ack_block_length, tvb, offset, len_missing_packet, gquic_info->encoding);
- offset += len_missing_packet;
+ /* Ack Block Length */
+ proto_tree_add_item(ft_tree, hf_gquic_frame_type_ack_ack_block_length, tvb, offset, len_missing_packet, gquic_info->encoding);
+ offset += len_missing_packet;
- num_blocks--;
- }
+ num_blocks--;
}
/* Timestamp */