Improve ICMP conversation tracking, especially when capturing on multiple interfaces...
[obnox/wireshark/wip.git] / epan / dissectors / packet-icmpv6.c
index 8d04affca72d1415b083ab7b44e09090db3daf85..9937601ae1c6c89cf94ced96bfd03e7eb5781daf 100644 (file)
@@ -3232,6 +3232,8 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
                 if (icmp6_type == ICMP6_ECHO_REQUEST) {
                     conv_key[0] = (guint32)cksum;
+                    if (pinfo->flags.in_gre_pkt)
+                        conv_key[0] |= 0x00010000; /* set a bit for "in GRE" */
                     trans = transaction_start(pinfo, icmp6_tree, conv_key);
                 } else { /* ICMP6_ECHO_REPLY */
                     guint16 tmp[2];
@@ -3241,6 +3243,8 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                     cksum_vec[0].len = sizeof(tmp);
                     cksum_vec[0].ptr = (guint8 *)tmp;
                     conv_key[0] = in_cksum(cksum_vec, 1);
+                    if (pinfo->flags.in_gre_pkt)
+                        conv_key[0] |= 0x00010000; /* set a bit for "in GRE" */
                     trans = transaction_end(pinfo, icmp6_tree, conv_key);
                 }
             }