QUIC: Add Version Negotiation dissection
authorAlexis La Goutte <alexis.lagoutte@gmail.com>
Sun, 15 May 2016 17:37:57 +0000 (19:37 +0200)
committerMichael Mann <mmann78@netscape.net>
Sun, 15 May 2016 22:37:08 +0000 (22:37 +0000)
Ping-Bug:11494
Change-Id: I3f0999049cd47f70154fdfbd3ca618c413dbea87
Reviewed-on: https://code.wireshark.org/review/15439
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-quic.c

index b8fd16827d3b56441b3f62c56d4224287c2704d9..f7107edcfeebe331d6c355dec65555314c9c6d0a 100644 (file)
@@ -1639,8 +1639,18 @@ dissect_quic_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
     /* Version */
     if(puflags & PUFLAGS_VRSN){
-        proto_tree_add_item(quic_tree, hf_quic_version, tvb, offset, 4, ENC_ASCII|ENC_NA);
-        offset += 4;
+        if(pinfo->srcport == 443){ /* Version Negotiation Packet */
+            while(tvb_reported_length_remaining(tvb, offset) > 0){
+                proto_tree_add_item(quic_tree, hf_quic_version, tvb, offset, 4, ENC_ASCII|ENC_NA);
+                offset += 4;
+            }
+            col_add_fstr(pinfo->cinfo, COL_INFO, "Version Negotiation, CID: %" G_GINT64_MODIFIER "u", cid);
+            return offset;
+        }
+        else{
+            proto_tree_add_item(quic_tree, hf_quic_version, tvb, offset, 4, ENC_ASCII|ENC_NA);
+            offset += 4;
+        }
     }
 
     /* Public Reset Packet */