diff options
author | Michael Mann <mmann78@netscape.net> | 2013-10-20 18:00:05 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-10-20 18:00:05 +0000 |
commit | df6594bbd2cd202f160c458a259b2943169c6646 (patch) | |
tree | 3c43ac5c4f22d0a4d0a672b2648c6c7e13fac069 /epan/dissectors/packet-mpls.c | |
parent | a9d79ebb94b6e983283df90d4a909c8ee5e5b9fd (diff) |
Pass MPLS "private data" into subdissectors instead of using pinfo->private_data.
svn path=/trunk/; revision=52718
Diffstat (limited to 'epan/dissectors/packet-mpls.c')
-rw-r--r-- | epan/dissectors/packet-mpls.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-mpls.c b/epan/dissectors/packet-mpls.c index 34f413dae2..0542add032 100644 --- a/epan/dissectors/packet-mpls.c +++ b/epan/dissectors/packet-mpls.c @@ -525,6 +525,9 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) col_set_str(pinfo->cinfo, COL_PROTOCOL, "MPLS"); col_set_str(pinfo->cinfo, COL_INFO, "MPLS Label Switched Packet"); + /* Ensure structure is initialized */ + memset(&mplsinfo, 0, sizeof(struct mplsinfo)); + /* Start Decoding Here. */ while (tvb_reported_length_remaining(tvb, offset) > 0) { @@ -539,8 +542,6 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) mplsinfo.bos = bos; mplsinfo.ttl = ttl; - pinfo->private_data = &mplsinfo; - if (tree) { proto_item *ti; proto_tree *mpls_tree; @@ -600,8 +601,8 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) next_tvb = tvb_new_subset_remaining(tvb, offset); /* 1) explicit label-to-dissector binding ? */ - found = dissector_try_uint(mpls_subdissector_table, label, - next_tvb, pinfo, tree); + found = dissector_try_uint_new(mpls_subdissector_table, label, + next_tvb, pinfo, tree, FALSE, &mplsinfo); if (found) return; |