From 2a3612f8e17c53ba71cf5fb9978a3a6e939f60d6 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 24 Jul 2016 01:32:34 -0700 Subject: Don't even *mention* the TTL/hop limit if we don't have it. That's cleaner than reporting it as 0. Change-Id: I862130c98131ba83f9689201d852e2f1aab34770 Reviewed-on: https://code.wireshark.org/review/16619 Reviewed-by: Guy Harris --- epan/dissectors/packet-icmpv6.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-icmpv6.c') diff --git a/epan/dissectors/packet-icmpv6.c b/epan/dissectors/packet-icmpv6.c index 3d830c7248..22a24c1870 100644 --- a/epan/dissectors/packet-icmpv6.c +++ b/epan/dissectors/packet-icmpv6.c @@ -3584,8 +3584,12 @@ dissect_icmpv6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) sequence = tvb_get_ntohs(tvb, offset); offset += 2; - col_append_fstr(pinfo->cinfo, COL_INFO, " id=0x%04x, seq=%u, hop limit=%u", - identifier, sequence, (iph != NULL) ? iph->ip_ttl : 0); + col_append_fstr(pinfo->cinfo, COL_INFO, " id=0x%04x, seq=%u", + identifier, sequence); + if (iph != NULL) { + col_append_fstr(pinfo->cinfo, COL_INFO, ", hop limit=%u", + iph->ip_ttl); + } if (pinfo->destport == 3544 && icmp6_type == ICMP6_ECHO_REQUEST) { /* RFC 4380 -- cgit v1.2.3