diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2018-09-10 20:48:10 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-09-26 05:05:11 +0000 |
commit | bb4badac599565093baac74a2376e1bca1ae4626 (patch) | |
tree | 52c3c6bc2b68de5b6c1ee9cae9f9a4980252641d /epan/dissectors/packet-quic.c | |
parent | 1768252ef2c0aa7b7b0e728e752bb8422db2d323 (diff) |
QUIC: Add support of gQUIC (Q044)
it is the first release to start to follow IETF QUIC (draft-12)
Update also the heuristic to detect Q044
Bug: 15131
Change-Id: Ieec7d75a2a0a7ab1ddacfb88d86cb9856cd67164
Reviewed-on: https://code.wireshark.org/review/29572
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 | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/epan/dissectors/packet-quic.c b/epan/dissectors/packet-quic.c index 6013187dc7..b38e8289f6 100644 --- a/epan/dissectors/packet-quic.c +++ b/epan/dissectors/packet-quic.c @@ -271,8 +271,13 @@ static inline gboolean is_quic_draft_max(guint32 version, guint8 max_version) { return draft_version && draft_version <= max_version; } +static inline guint8 is_gquic_version(guint32 version) { + return version == 0x51303434; /* Q044 is the first release to use IETF QUIC (draft-12) packet header */ +} + const value_string quic_version_vals[] = { { 0x00000000, "Version Negotiation" }, + { 0x51303434, "Google Q044" }, { 0xff000004, "draft-04" }, { 0xff000005, "draft-05" }, { 0xff000006, "draft-06" }, @@ -2277,6 +2282,7 @@ static gboolean dissect_quic_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree conversation_t *conversation = NULL; int offset = 0; guint8 flags; + guint32 version; gboolean is_quic = FALSE; /* Verify packet size (Flag (1 byte) + Connection ID (8 bytes) + Version (4 bytes)) */ @@ -2293,8 +2299,9 @@ static gboolean dissect_quic_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree } offset += 1; - // check for draft QUIC version (for draft -11 and newer) - is_quic = quic_draft_version(tvb_get_ntohl(tvb, offset)) >= 11; + // check for draft QUIC version (for draft -11 and newer) or check for gQUIC version (= Q044) + version = tvb_get_ntohl(tvb, offset); + is_quic = (quic_draft_version(version) >= 11) || is_gquic_version(version); if (is_quic) { conversation = find_or_create_conversation(pinfo); |