aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorcmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>2011-12-03 04:32:08 +0000
committercmaynard <cmaynard@f5534014-38df-0310-8fa8-9805f1628bb7>2011-12-03 04:32:08 +0000
commitf88f80d9fdedcf45e8de5ee52c28afca462252ae (patch)
tree462e451c97a7c956b441561ba91bab117a3d9fbd /epan/dissectors
parentf390b6e0ff4860522e87d008bba65da44dee4ac9 (diff)
Some code needs to execute (potentially) whether the tree is NULL or not. Also, changed "Left Segments" to read, "Segments Left" to better match RFC 2460 and RFC 3775 terminology.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@40077 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-ipv6.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ipv6.c b/epan/dissectors/packet-ipv6.c
index b12459f274..34e0c60617 100644
--- a/epan/dissectors/packet-ipv6.c
+++ b/epan/dissectors/packet-ipv6.c
@@ -571,7 +571,10 @@ dissect_routing6(tvbuff_t *tvb, int offset, proto_tree *tree, packet_info *pinfo
tvb_memcpy(tvb, (guint8 *)&rt, offset, sizeof(rt));
len = (rt.ip6r_len + 1) << 3;
- if (tree) {
+ /* Assigning seg_left and the if (seg_left) {} blocks of code that follow,
+ * along with any expert_add_info_format() calls, all need to execute when
+ * appropriate, regardless of whether the tree is NULL or not. */
+ if (1) {
/* !!! specify length */
ti = proto_tree_add_uint_format(tree, hf_ipv6_routing_hdr_opt, tvb,
offset, len, rt.ip6r_type,
@@ -2275,9 +2278,9 @@ proto_register_ipv6(void)
FT_UINT8, BASE_DEC, VALS(routing_header_type), 0x0,
"Routeing Header Type", HFILL }},
{ &hf_ipv6_routing_hdr_left,
- { "Left Segments", "ipv6.routing_hdr.left",
+ { "Segments Left", "ipv6.routing_hdr.left",
FT_UINT8, BASE_DEC, NULL, 0x0,
- "Routing Header Left Segments", HFILL }},
+ "Routing Header Segments Left", HFILL }},
{ &hf_ipv6_routing_hdr_addr,
{ "Address", "ipv6.routing_hdr.addr",
FT_IPv6, BASE_NONE, NULL, 0x0,