aboutsummaryrefslogtreecommitdiffstats
path: root/packet-gtp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-04-10 19:10:10 +0000
committerGuy Harris <guy@alum.mit.edu>2001-04-10 19:10:10 +0000
commit7f0aaa324de03469e31b3e04b8a4209752ea1c1d (patch)
tree3aa1b681ff8197417b259053ec13918835fe4b5d /packet-gtp.c
parent7c145dc63e956cf875a68f962f16537a5837020f (diff)
If the tvbuff pointer is null in "alloc_field_info()", get the data
source name from "pi.compat_top_tvb", which should always be set to the tvbuff that refers to the data that old-style dissectors are currently working on. Arrange that it be so set in those dissectors that create alternate data sources and call other dissectors, and also arrange that "pi.len" and "pi.captured_len" be set appropriately as well. svn path=/trunk/; revision=3286
Diffstat (limited to 'packet-gtp.c')
-rw-r--r--packet-gtp.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/packet-gtp.c b/packet-gtp.c
index cddddd7337..8aa2130b63 100644
--- a/packet-gtp.c
+++ b/packet-gtp.c
@@ -2,7 +2,7 @@
* Routines for GTP dissection
* Copyright 2001, Michal Melerowicz <michal.melerowicz@nokia.com>
*
- * $Id: packet-gtp.c,v 1.2 2001/04/04 03:29:49 gram Exp $
+ * $Id: packet-gtp.c,v 1.3 2001/04/10 19:10:09 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -1592,6 +1592,7 @@ decode_gtp_proto_conf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
guint8 *target;
proto_tree *ext_tree;
proto_item *te;
+ packet_info save_pi;
te = proto_tree_add_text(tree, tvb, offset, 1, val_to_str(GTP_EXT_PROTO_CONF, gtp_ext_val, "Unknown message"));
ext_tree = proto_item_add_subtree(te, ett_gtp_ext);
@@ -1626,7 +1627,18 @@ decode_gtp_proto_conf(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree
tvb_set_free_cb(temp, free_tvb_data);
tvb_set_child_real_data_tvbuff(tvb, temp);
next_tvb = tvb_new_subset(temp, offset+5+raw_offset, proto_len+2, proto_len+2);
+
+ /* Save the current value of "pi", and adjust
+ certain fields to reflect the new top-level
+ tvbuff. */
+ save_pi = pi;
+ pi.compat_top_tvb = temp;
+ pi.len = tvb_reported_length(temp);
+ pi.captured_len = tvb_length(temp);
+
call_dissector(ppp_handle, next_tvb, pinfo, ext_tree);
+
+ pi = save_pi;
}
}