diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2019-01-06 11:13:19 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-01-10 21:27:59 +0000 |
commit | a0b9e8b6525fe139eaa17a14213d43a05789eb68 (patch) | |
tree | b0701b7f2691b8d9c2cfb239e7e3652ec28043d7 | |
parent | f1fa8df3241c7e3177e0504a608b1a943ccebc00 (diff) |
QUIC: update flag on long packet headers (draft-17)
Bug: 13881
Change-Id: I3e92ec8cba3482ab9d13f1102425a7b9ec7ccd76
Reviewed-on: https://code.wireshark.org/review/31407
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r-- | epan/dissectors/packet-quic.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-quic.c b/epan/dissectors/packet-quic.c index 4ac49ad7ab..c6db4b755a 100644 --- a/epan/dissectors/packet-quic.c +++ b/epan/dissectors/packet-quic.c @@ -326,10 +326,10 @@ static const value_string quic_cid_len_vals[] = { { 0, NULL } }; -#define QUIC_LPT_INITIAL 0x7F -#define QUIC_LPT_RETRY 0x7E -#define QUIC_LPT_HANDSHAKE 0x7D -#define QUIC_LPT_0RTT 0x7C +#define QUIC_LPT_INITIAL 0x0 +#define QUIC_LPT_RETRY 0x1 +#define QUIC_LPT_HANDSHAKE 0x2 +#define QUIC_LPT_0RTT 0x3 #define QUIC_SHORT_PACKET 0xff /* dummy value that is definitely not LPT */ static const value_string quic_long_packet_type_vals[] = { @@ -2067,7 +2067,7 @@ quic_get_message_tvb(tvbuff_t *tvb, const guint offset) guint64 token_length; guint64 payload_length; guint8 packet_type = tvb_get_guint8(tvb, offset); - guint8 long_packet_type = packet_type & 0x7f; + guint8 long_packet_type = (packet_type & 0x30) >> 4; // Retry and VN packets cannot be coalesced (clarified in draft -14). if ((packet_type & 0x80) && long_packet_type != QUIC_LPT_RETRY) { // long header form, check version @@ -2117,7 +2117,7 @@ quic_extract_header(tvbuff_t *tvb, guint8 *long_packet_type, guint32 *version, gboolean is_long_header = packet_type & 0x80; if (is_long_header) { // long header form - *long_packet_type = packet_type & 0x7f; + *long_packet_type = (packet_type & 0x30) >> 4; } else { // short header form, store dummy value that is not a long packet type. *long_packet_type = QUIC_SHORT_PACKET; @@ -2359,7 +2359,7 @@ proto_register_quic(void) { &hf_quic_long_packet_type, { "Packet Type", "quic.long.packet_type", - FT_UINT8, BASE_DEC, VALS(quic_long_packet_type_vals), 0x7F, + FT_UINT8, BASE_DEC, VALS(quic_long_packet_type_vals), 0x30, "Long Header Packet Type", HFILL } }, { &hf_quic_dcid, |