diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-06-02 06:10:08 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-06-02 06:10:08 +0000 |
commit | 89a74629b27c4a462cabac80a3170fec156ad1b8 (patch) | |
tree | 7489b0275743dc74b4b3196d83d256c8406d6de8 /packet-icmpv6.c | |
parent | b2ab758ca7601c28cf35a6b4c5a46c157da2ea4e (diff) | |
download | wireshark-89a74629b27c4a462cabac80a3170fec156ad1b8.tar.gz wireshark-89a74629b27c4a462cabac80a3170fec156ad1b8.tar.bz2 wireshark-89a74629b27c4a462cabac80a3170fec156ad1b8.zip |
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.c | 10 |
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"; |