aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-icmp.c
diff options
context:
space:
mode:
authorcmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>2011-11-08 17:25:22 +0000
committercmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>2011-11-08 17:25:22 +0000
commitd5a3a466d3c867a0146bc534de3bb23dd5cc5ea9 (patch)
treedafa28c79b9a6815988bf26ebe7e5a1ce88e0487 /epan/dissectors/packet-icmp.c
parentf41faa8069bb7ea04a4a5c5f809fc7137370f9af (diff)
Improve ICMP conversation tracking, especially when capturing on multiple interfaces and one of them is a GRE tunnel. Resolves bug 5770, which was reopened.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39757 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-icmp.c')
-rw-r--r--epan/dissectors/packet-icmp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-icmp.c b/epan/dissectors/packet-icmp.c
index 77b3eb3ddd..eb0522bb3c 100644
--- a/epan/dissectors/packet-icmp.c
+++ b/epan/dissectors/packet-icmp.c
@@ -1065,6 +1065,8 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if ( icmp_type == ICMP_ECHOREPLY ) {
if ( !pinfo->in_error_pkt ) {
conv_key[0] = (guint32)tvb_get_ntohs(tvb, 2);
+ if (pinfo->flags.in_gre_pkt)
+ conv_key[0] |= 0x00010000; /* set a bit for "in GRE" */
conv_key[1] = (guint32)((tvb_get_ntohs(tvb, 4) << 16) |
tvb_get_ntohs(tvb, 6));
trans = transaction_end(pinfo, icmp_tree, conv_key);
@@ -1076,6 +1078,8 @@ dissect_icmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tmp[0] = ~tvb_get_ntohs(tvb, 2);
tmp[1] = ~0x0800; /* The difference between echo request & reply */
conv_key[0] = ip_checksum((guint8 *)&tmp, sizeof(tmp));
+ if (pinfo->flags.in_gre_pkt)
+ conv_key[0] |= 0x00010000; /* set a bit for "in GRE" */
conv_key[1] = (guint32)((tvb_get_ntohs(tvb, 4) << 16) |
tvb_get_ntohs(tvb, 6));
trans = transaction_start(pinfo, icmp_tree, conv_key);