aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-07-06 19:44:56 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2004-07-06 19:44:56 +0000
commitd88fe78812b91f3388ff7037ff1ac872a8a09695 (patch)
tree26de0ca2a560bf24f51672a8bb3028847cf33484
parent714111e01bde3734cea9158e8af92c6568f2d5b1 (diff)
From Shinsuke Suzuke: fix a PIM address list bug, and put the address
list into a subtree. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@11324 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r--packet-pim.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/packet-pim.c b/packet-pim.c
index f0faddd475..d1f598a9c9 100644
--- a/packet-pim.c
+++ b/packet-pim.c
@@ -2,7 +2,7 @@
* Routines for PIM disassembly
* (c) Copyright Jun-ichiro itojun Hagino <itojun@itojun.org>
*
- * $Id: packet-pim.c,v 1.47 2003/12/12 21:17:54 guy Exp $
+ * $Id: packet-pim.c,v 1.48 2004/07/06 19:44:56 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -807,10 +807,15 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
case 65001: /* address list (old implementations) */
{
int i;
- proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
+ proto_tree *sub_tree = NULL;
+ proto_item *addrlist_option;
+
+ addrlist_option = proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,
"%sAddress List (%u)",
hello_opt == 65001 ? "old " : "",
hello_opt);
+ sub_tree = proto_item_add_subtree(addrlist_option, ett_pim);
+
for (i = offset + 4; i < offset + 4 + opt_len; ) {
int advance;
const char *s;
@@ -818,10 +823,11 @@ dissect_pim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
s = dissect_pim_addr(tvb, i, pimv2_unicast, &advance);
if (s == NULL)
break;
- proto_tree_add_text(pimopt_tree, tvb, offset,
+ proto_tree_add_text(sub_tree, tvb, offset,
advance, "Address: %s", s);
i += advance;
}
+ break;
}
default:
proto_tree_add_text(pimopt_tree, tvb, offset, 4 + opt_len,