aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-09-13 01:04:48 +0200
committerAnders Broman <a.broman58@gmail.com>2018-09-14 19:22:07 +0000
commit8669705f7ec09a04d23dfa8f114457a539b73461 (patch)
tree4200f8ddfbf47945c65b2a70ee49fc281261f2ad
parent56a30766ef40812fe79a0b04461d91a7aa170825 (diff)
QUIC: recognize CRYPTO frame (draft -13)
Avoids malformed packet warnings. Actual TLS handshake/alert protocol support will be done later. Change-Id: I87e783ab12a10afad7c0372a0b3a900a5e37f6e1 Ping-Bug: 13881 Reviewed-on: https://code.wireshark.org/review/29642 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-quic.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/epan/dissectors/packet-quic.c b/epan/dissectors/packet-quic.c
index e11ab90..dbc1e14 100644
--- a/epan/dissectors/packet-quic.c
+++ b/epan/dissectors/packet-quic.c
@@ -109,6 +109,9 @@ static int hf_quic_frame_type_nci_connection_id = -1;
static int hf_quic_frame_type_nci_stateless_reset_token = -1;
static int hf_quic_frame_type_ss_stream_id = -1;
static int hf_quic_frame_type_ss_application_error_code = -1;
+static int hf_quic_frame_type_crypt_offset = -1;
+static int hf_quic_frame_type_crypt_length = -1;
+static int hf_quic_frame_type_crypt_crypto_data = -1;
static expert_field ei_quic_connection_unknown = EI_INIT;
static expert_field ei_quic_ft_unknown = EI_INIT;
@@ -339,6 +342,7 @@ static const value_string quic_long_packet_type_vals[] = {
#define FT_STREAM_15 0x15
#define FT_STREAM_16 0x16
#define FT_STREAM_17 0x17
+#define FT_CRYPTO 0x18
static const range_string quic_frame_type_vals[] = {
{ 0x00, 0x00, "PADDING" },
@@ -358,6 +362,7 @@ static const range_string quic_frame_type_vals[] = {
{ 0x0e, 0x0e, "PATH_CHALLENGE" },
{ 0x0f, 0x0f, "PATH_RESPONSE" },
{ 0x10, 0x17, "STREAM" },
+ { 0x18, 0x18, "CRYPTO" },
{ 0, 0, NULL },
};
@@ -1127,6 +1132,18 @@ dissect_quic_frame_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *quic_tree
}
break;
+ case FT_CRYPTO: {
+ guint64 crypto_offset, crypto_length;
+ guint32 lenvar;
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", CRYPT");
+ proto_tree_add_item_ret_varint(ft_tree, hf_quic_frame_type_crypt_offset, tvb, offset, -1, ENC_VARINT_QUIC, &crypto_offset, &lenvar);
+ offset += lenvar;
+ proto_tree_add_item_ret_varint(ft_tree, hf_quic_frame_type_crypt_length, tvb, offset, -1, ENC_VARINT_QUIC, &crypto_length, &lenvar);
+ offset += lenvar;
+ proto_tree_add_item(ft_tree, hf_quic_frame_type_crypt_crypto_data, tvb, offset, (guint32)crypto_length, ENC_NA);
+ offset += (guint32)crypto_length;
+ }
+ break;
default:
expert_add_info_format(pinfo, ti_ft, &ei_quic_ft_unknown, "Unknown Frame Type %u", frame_type);
break;
@@ -2524,6 +2541,22 @@ proto_register_quic(void)
"Indicates why the sender is ignoring the stream", HFILL }
},
+ /* CRYPTO */
+ { &hf_quic_frame_type_crypt_offset,
+ { "Offset", "quic.frame_type.crypt.offset",
+ FT_UINT64, BASE_DEC, NULL, 0x0,
+ "Byte offset into the stream", HFILL }
+ },
+ { &hf_quic_frame_type_crypt_length,
+ { "Length", "quic.frame_type.crypt.length",
+ FT_UINT64, BASE_DEC, NULL, 0x0,
+ "Length of the Crypto Data field", HFILL }
+ },
+ { &hf_quic_frame_type_crypt_crypto_data,
+ { "Crypto Data", "quic.frame_type.crypt.crypto_data",
+ FT_NONE, BASE_NONE, NULL, 0x0,
+ "The cryptographic message data", HFILL }
+ },
};
static gint *ett[] = {