aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-icmpv6.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-11-23 19:16:05 +0000
committerMichael Mann <mmann78@netscape.net>2013-11-23 19:16:05 +0000
commit55c6869980d76369255442d7e32d35965ae29625 (patch)
treea535aac635bc9b356bebaa7e0f042dffe6fd08b9 /epan/dissectors/packet-icmpv6.c
parent9150571bf3f68f3a1d5fcbfd1b05b55160dabd6a (diff)
Remove ip_ttl from packet_info structure.
Part of the fix includes having the IPv6 dissector populate as much of a ws_ip structure as possible to pass to subdissectors of the "ip.proto" table, so the ttl value can be picked up. svn path=/trunk/; revision=53522
Diffstat (limited to 'epan/dissectors/packet-icmpv6.c')
-rw-r--r--epan/dissectors/packet-icmpv6.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c
index 30c9ea5065..007e19ec0b 100644
--- a/epan/dissectors/packet-icmpv6.c
+++ b/epan/dissectors/packet-icmpv6.c
@@ -55,6 +55,7 @@
#include "packet-icmp.h" /* same transaction_t used both both v4 and v6 */
#include "packet-ieee802154.h"
#include "packet-6lowpan.h"
+#include "packet-ip.h"
/*
* The information used comes from:
@@ -3176,7 +3177,7 @@ dissect_mldrv2( tvbuff_t *tvb, guint32 offset, packet_info *pinfo _U_, proto_tre
static int
-dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
+dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
proto_tree *icmp6_tree = NULL, *flag_tree = NULL;
proto_item *ti = NULL, *hidden_item, *checksum_item = NULL, *code_item = NULL, *ti_flag = NULL;
@@ -3189,6 +3190,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
tvbuff_t *next_tvb;
guint8 icmp6_type, icmp6_code;
icmp_transaction_t *trans = NULL;
+ ws_ip *iph = (ws_ip*)data;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "ICMPv6");
col_clear(pinfo->cinfo, COL_INFO);
@@ -3307,7 +3309,7 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
offset += 2;
col_append_fstr(pinfo->cinfo, COL_INFO, " id=0x%04x, seq=%u, hop limit=%u",
- identifier, sequence, pinfo->ip_ttl);
+ identifier, sequence, (iph != NULL) ? iph->ip_ttl : 0);
if (pinfo->destport == 3544 && icmp6_type == ICMP6_ECHO_REQUEST) {
/* RFC 4380