aboutsummaryrefslogtreecommitdiffstats
path: root/packet-icmpv6.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-06-02 06:10:08 +0000
committerGuy Harris <guy@alum.mit.edu>2001-06-02 06:10:08 +0000
commit89a74629b27c4a462cabac80a3170fec156ad1b8 (patch)
tree7489b0275743dc74b4b3196d83d256c8406d6de8 /packet-icmpv6.c
parentb2ab758ca7601c28cf35a6b4c5a46c157da2ea4e (diff)
Create the tree for an ICMPv6 optionn before putting something in it.
svn path=/trunk/; revision=3499
Diffstat (limited to 'packet-icmpv6.c')
-rw-r--r--packet-icmpv6.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/packet-icmpv6.c b/packet-icmpv6.c
index 02865a0a11..d696c0707b 100644
--- a/packet-icmpv6.c
+++ b/packet-icmpv6.c
@@ -1,7 +1,7 @@
/* packet-icmpv6.c
* Routines for ICMPv6 packet disassembly
*
- * $Id: packet-icmpv6.c,v 1.44 2001/06/01 23:53:48 itojun Exp $
+ * $Id: packet-icmpv6.c,v 1.45 2001/06/02 06:10:08 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -171,6 +171,10 @@ again:
tvb_memcpy(tvb, (guint8 *)opt, offset, sizeof *opt);
len = opt->nd_opt_len << 3;
+ /* !!! specify length */
+ ti = proto_tree_add_text(tree, tvb, offset, len, "ICMPv6 options");
+ icmp6opt_tree = proto_item_add_subtree(ti, ett_icmpv6opt);
+
if (len == 0) {
proto_tree_add_text(icmp6opt_tree, tvb,
offset + offsetof(struct nd_opt_hdr, nd_opt_len), 1,
@@ -179,10 +183,6 @@ again:
return; /* we must not try to decode this */
}
- /* !!! specify length */
- ti = proto_tree_add_text(tree, tvb, offset, len, "ICMPv6 options");
- icmp6opt_tree = proto_item_add_subtree(ti, ett_icmpv6opt);
-
switch (opt->nd_opt_type) {
case ND_OPT_SOURCE_LINKADDR:
typename = "Source link-layer address";