diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2017-11-15 07:02:22 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2017-12-23 19:30:57 +0000 |
commit | 5f1ed2b221758c317b639dd1823b3d7b957c0c8f (patch) | |
tree | 3f1f229b98204562e3b5bc519f888924bcb5b2dd /epan/dissectors/packet-quic.c | |
parent | c60d7bb199afbd752aaa3640cfee222585dd3e25 (diff) |
QUIC: RST_STREAM error code is now application error code (with 2 bytes)
Change-Id: I2f5702069d494f535e4b1b8743e76a9e0a3e5945
Reviewed-on: https://code.wireshark.org/review/24433
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-quic.c')
-rw-r--r-- | epan/dissectors/packet-quic.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/epan/dissectors/packet-quic.c b/epan/dissectors/packet-quic.c index c1736a266b..857b7dc144 100644 --- a/epan/dissectors/packet-quic.c +++ b/epan/dissectors/packet-quic.c @@ -82,6 +82,7 @@ static int hf_quic_frame_type_padding_length = -1; static int hf_quic_frame_type_padding = -1; static int hf_quic_frame_type_rsts_stream_id = -1; static int hf_quic_frame_type_rsts_error_code = -1; +static int hf_quic_frame_type_rsts_application_error_code = -1; static int hf_quic_frame_type_rsts_final_offset = -1; static int hf_quic_frame_type_cc_old_error_code = -1; static int hf_quic_frame_type_cc_error_code = -1; @@ -562,13 +563,22 @@ dissect_quic_frame_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *quic_ guint32 stream_id, error_code; proto_tree_add_item_ret_uint(ft_tree, hf_quic_frame_type_rsts_stream_id, tvb, offset, 4, ENC_BIG_ENDIAN, &stream_id); offset += 4; - proto_tree_add_item_ret_uint(ft_tree, hf_quic_frame_type_rsts_error_code, tvb, offset, 4, ENC_BIG_ENDIAN, &error_code); - offset += 4; + if(quic_info->version == 0xFF000005 || quic_info->version == 0xFF000006) { + proto_tree_add_item_ret_uint(ft_tree, hf_quic_frame_type_rsts_error_code, tvb, offset, 4, ENC_BIG_ENDIAN, &error_code); + offset += 4; + } else { + proto_tree_add_item_ret_uint(ft_tree, hf_quic_frame_type_rsts_application_error_code, tvb, offset, 2, ENC_BIG_ENDIAN, &error_code); + offset += 2; + } proto_tree_add_item(ft_tree, hf_quic_frame_type_rsts_final_offset, tvb, offset, 8, ENC_BIG_ENDIAN); offset += 8; proto_item_append_text(ti_ft, " Stream ID: %u, Error code: %s", stream_id, val_to_str_ext(error_code, &quic_error_code_vals_ext, "Unknown (%d)")); - proto_item_set_len(ti_ft, 1 + 4 + 4 + 8); + if(quic_info->version == 0xFF000005 || quic_info->version == 0xFF000006) { + proto_item_set_len(ti_ft, 1 + 4 + 4 + 8); + } else { + proto_item_set_len(ti_ft, 1 + 4 + 2 + 8); + } col_prepend_fstr(pinfo->cinfo, COL_INFO, "RST STREAM, "); @@ -1079,6 +1089,11 @@ proto_register_quic(void) FT_UINT32, BASE_DEC|BASE_EXT_STRING, &quic_error_code_vals_ext, 0x0, "Indicates why the stream is being closed", HFILL } }, + { &hf_quic_frame_type_rsts_application_error_code, + { "Application Error code", "quic.frame_type.rsts.application_error_code", + FT_UINT16, BASE_DEC|BASE_EXT_STRING, &quic_error_code_vals_ext, 0x0, + "Indicates why the stream is being closed", HFILL } + }, { &hf_quic_frame_type_rsts_final_offset, { "Final offset", "quic.frame_type.rsts.byte_offset", FT_UINT64, BASE_DEC, NULL, 0x0, |